Windchill REST Services Domain Capabilities > PTC Domains > PTC Domains > PTC CAD Document Management Domain > Actions Available in the PTC CAD Document Management Domain
Actions Available in the PTC CAD Document Management Domain
The following actions are available in the PTC CAD Document Management domain:
GetStructure
The action GetStructure returns a CAD structure using a hierarchy of entities called Components. The action is bound to the CADDocument entity.
You can expand Components using the CADDocument and CADDocumentUse navigation properties to get more details about the documents and their structure.
When you call the GetStructure action, you can specify the ID of NavigationCriteria in the request body. This is the ID of the saved filter that you want to use as the filter criteria. If you do not specify the ID of the filter in the request body, then the default filter is used to work with the CAD structure. Alternatively, you can specify the inline navigation criteria in the request payload.
When you call the GetStructure action, the Components entity additionally returns the following attributes in the response:
Resolved–The attribute indicates whether the version of the CAD document is resolved by the configuration specification specified in the navigation criteria.
The attribute returns the Boolean value true or false depending on whether the link is resolved or not. The value is returned as true when you have access to the version of the CAD document selected by the navigation criteria. The value is returned as false when you do not have access to the CAD document or when no CAD document version is selected by the navigation criteria.
* 
When navigation criteria are not provided in the request body and you do not have access to the CAD document which is in any one of the states such as Latest, In Work, only Latest, or Released, the CAD document is unresolved.
HasUnresolvedObjectsByAccessRights–The attribute indicates whether you have access to all documents in the structure returned in the response. The value is only set on the top-level or parent CAD document specified in the request URL.
The attribute returns the Boolean value true or false only for the specified top-level or parent document. The value is returned as null for all child components. The value is returned as false when you have access to the child documents. The value is returned as true when one or more child components at any level in its structure are unresolved and you do not have access to those.
HasChildren–The attribute indicates whether the Components entity has child components. The attribute is designed to return information when you want to create UIs that do not expand the entire structure but need an indication if a component can be expanded to another level.
The attribute returns the Boolean value true or false. The value is returned as true for the components with child components that are resolved and have uses links to other child components. The value is returned as true for each child component that can be further expanded until the leaf node. The value is returned as false for the component that has no child components or is unresolved. The value is also returned as false for the leaf node.
* 
The value of HasChildren is returned as false for a child CAD document in any of the following cases:
When you do not have access to the child CAD document.
When the configuration specification in the applied navigation criteria does not resolve the child CAD document version.
PVTreeId is the occurrence path of the CAD assembly to its member subcomponents in the viewable file. The complete path from the root of the BOM structure is returned. This URL can be used to work with Visualization tree. For example, in an application you consume this URL and highlight the component in the Visualization tree.
PVParentTreeId is the occurrence path to the parent of the component part in the viewable file. The complete path from the root of the BOM structure is returned.
The action supports the Boolean parameter BOMMembersOnly. If you specify BOMMembersOnly as true in the request body, only the CAD documents that participate in the BOM structure are returned. The default value of BOMMembersOnly is false. If the request body is empty, the default value of the parameter is used, and all the structure members are returned.
* 
If the BOM structure contains documents that do not contribute to the BOM, and the user does not have access to such documents, then even though the BOMMembersOnly parameter is set to true in the request body and navigation criteria is specified, the unresolved dependents are returned.
In the request body, use the following code to specify the BOMMembersOnly parameter:
{
"BOMMembersOnly" : true
}
GetStructure honors the preferences set for the Auto Associate action in Windchill while returning the structure. The document types and subtypes added to this preference do not participate in the BOM structure of the CAD document.
For example, when BOMMembersOnly is specified as true, CAD documents are not included in the structure in the following cases:
When you add the document types and subtypes in the following preference:
Utilities > Preference Management > Operation > Auto Associate > Disallow Structure CAD Document Types
When the CAD document has a reusable attribute set in the following preference:
Utilities > Preference Management > Operation > Auto Associate > Part Structure Override Attribute Name
GetMultiLevelComponentsReport
The GetMultiLevelComponentsReport action returns a consolidated flat list of leaf node components and their total quantity within an entire CAD document structure, when the ShowSingleLevelReport flag is false. A leaf node component that is used multiple times is listed only once with its total quantity. The action returns the following information for each consolidated leaf node component:
Total quantity
Unit of measure
The consolidation of leaf node components is based on their Unit. The action consolidates the leaf nodes of the same unit and returns them as one leaf node with the total quantity and its unit.
When the value of ShowSingleLevelReport is specified as true in the request body, the action returns a consolidated flat list of components and their total quantity that are directly used by the specified CAD document structure. A component that is used multiple times is listed only once with the total quantity and its unit.
When ShowSingleLevelReport is not specified in the request body, its default value is false.
* 
This action is unlike the GetStructure action and does not list the levels of CAD documents and the document-component relationships within an entire CAD document structure.
The action is bound to the NavigationCriteria entity, that is, to the filter saved in Windchill.
The action supports the BOMMembersOnly parameter. If you specify BOMMembersOnly as true in the request body, only the CAD document components that participate in the BOM structure are returned. When BOMMembersOnly is not specified in the request body, its default value is false.
You can expand the CADDocument navigation property for more details about the consolidated component.
EditCADDocumentsSecurityLabels
The EditCADDocumentsSecurityLabels action enables you to edit the Security Labels for CAD Document objects.
这对您有帮助吗?