Schematics Platform Modeler |
Managing the Graphical Representation of a Schematic Reference Component |
![]() |
This macro shows you how to manage the
graphical representations (symbols) of a schematic reference component. This macro opens the document CAASCH_Detail03.CATProduct that contains three component symbols. One of the symbols (the highlighted one) has been associated with an existing schematic reference component. This macro shows how to add the other two unassociated symbols to the same reference component. It also illustrates how to remove one of the 3 symbols from the reference component and how to query for a list of associated symbols.
|
||||||
![]() |
CAASchCompRefGraphic is launched in CATIA
[1]. No open document is needed. CAASchCompRefGraphic.CATScript is located in the CAAScdSchUseCases module. Execute macro (Windows only). |
||||||
![]() |
CAASchCompRefGraphic includes the
following steps:
PrologThe macro first loads CAASCH_Detail03.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.
Find a schematic reference component in the modelUsing the GetRefComponents method, a list of existing schematic reference component in the model can be obtained. Note that the output of this method is a list of objects. The member of this list can be retrieved using the Item method. The second argument of this method specifies a particular interface to be returned on this member reference component. In this case it is the SchCompGraphic interface.
Add a graphical representation to the schematic reference componentThe macro calls GetComponentSymbol to find a symbol that has not been associated with any reference component. Using the symbol, it then calls AddGraphicalRepresentation to add this symbol to the reference component. This method is called a second time to add the third symbol. At this point, the reference component has three graphical representations.
Query for a list of graphical representation of the schematic reference componentListGraphicalRepresentation returns a list of graphical representations. This list should contains three members.
Remove a graphical representation from the schematic reference componentThe macro finds the first member of the list of graphical representations obtained from previous step and call RemoveGraphicalRepresentation to remove that symbol from the reference component.
|
[Top]
This use case shows how to add, remove and query for a list of graphical representations of a schematic reference component. 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.