Schematics Platform Modeler |
Querying Schematic Document Content |
![]() |
This macro shows you how to query for
information from a Schematic design document.
The information includes the following:
This macro open the CAASCH_CompRoute01.CATProduct document for querying information.
|
||||||||||
![]() |
CAASchQueryCompRoute is launched in CATIA
[1]. No open document is needed. Special environment must be available to successfully run this macro:
CAASchQueryCompRoute.CATScript is located in the CAAScdSchUseCases module. Execute macro (windows only). |
||||||||||
![]() |
CAASchQueryCompRoute includes the
following steps:
PrologThe macro first loads the document: CAASCH_CompRoute01.CATProduct.
Next, the macro acquires the schematic root object from the document. The schematic root is the top node of the object instance tree in a schematic document.
Query for the name of the current document in the sessionThe SchSession interface provides the GetCurrentDocument method to return the name of the current document.
Query for a list of Schematic reference components in the documentThe SchematicRoot interface provides the GetRefComponents method to return a list of Schematic component references in the document.
Query for a list of Schematic component instances in the documentThe SchematicRoot interface provides the GetComponents method to return a list of Schematic component instances in the document.
Find the positioning matrix of specific graphical image of a Schematic component instanceThis macro provides the GetComponentImage internal Function to return a specific SchGRRComp interface handle on a specific graphical image of a component instance. This interface provides the GetTransformation2D method to return the positioning matrix of the image.
Query for a list of all the connectors of a Schematic component instanceThe macro calls AppListConnectors to list all the connectors. Notice that the input objFilter is an empty list which specifies no filtering is requested.
For each connector in the returned list, the macro calls the method calls GetPosition method to obtain the x-y coordinates of the connector position.
Query for a list of all the Schematic route instances in the documentThe SchematicRoot interface provides the GetRoutes method to return a list of Schematic route instances in the document.
Query for a list of route path definition pointsThe macro calls the GetRoutePrimitives to get the graphical representation of a specific Schematic route instance. Then it calls GetPath to get a list of x-y coordinates for each defining points of the route path.
|
[Top]
This use case shows how to query the data of a Schematic document and of its object. A message logging the status of the critical steps is displayed at the end of the use case.
[Top]
[1] | Replaying a Macro |
[Top] |
Copyright © 2001, Dassault Systèmes. All rights reserved.