Skip to main content
5-Regular Member
December 30, 2022
Solved

Coordinate system position /orientation control in relation window for Pro program

  • December 30, 2022
  • 3 replies
  • 6929 views

Dear All,

 

I am in need of controlling the coordinate system position of a part (in the assembly-relation window) with conditional format for the pro program,

 

Case:

I have a assembly in that assembly one standard sub-assembly group will be there at middle  portion and another component (Part-A) will be assembled in the left side so this will be my one of the requirement and that same part (Part-A) has to be assembled in the right side for my another requirement, 

 

for this i am assembling only one time Part-A in the model tree by using coordinate system (Part cys + Ass cys) so for the other case i need to change the coordinate system position so that Part-A will be moved to the opposite side,

 

Please refer the attached snap.

 

Thanks in advance

 

 

Best answer by tbraxton

Create a conditional statement to set the offset transform matrix entries. The video shows that by testing the value of the configuration parameter, the location of the assembly csys is modified to shift the component. In this case, only 1 of the six transform matrix entries must be altered to place the component.

 

The pseudo code would look like this assuming there are only two variations configuration A or configuration B:

 

 

If configuration==A

 offset=-100 (assemble subasm on the left)

else

 offset=100 (assemble subasm on the right and configuration B is implied)

endif

 

The Creo syntax to implement this is:

IF CONFIG=="A"
 $D28=-100
ELSE
 $D28=100
ENDIF

 

 

 

tbraxton_0-1672601593350.gif

 

3 replies

KenFarley
21-Topaz II
December 30, 2022

If I were doing this I would have an assembly with the coordinate systems for both locations of the part, then make a family table that calls for having one or the other part in it.

The only way I can think to do this with CSYS is if you make a CSYS offset from one in the assembly, and use the Pro/Program or whatever to change the dimensions of the offset of the CSYS. I don't know how well this would work, but it's another possibility if you can't use family tables.

tbraxton
22-Sapphire II
22-Sapphire II
January 1, 2023

One option is to use a transform matrix to define the csys (used to place the subassembly) location relative to the assembly default csys. When done this way you can use relations to change the values of the transform matrix thereby moving the part from one location to another without creating a new csys. You only need to change the values of the transform to move the csys to a new location and orientation.

 

Refer to this link:

https://support.ptc.com/help/creo/creo_pma/r9.0/usascii/index.html#page/fundamentals/fundamentals/to_generate_a_transformation_matrix.html#wwID0EZY3S 

19-Tanzanite
January 1, 2023

There are probably several ways of achieving this, but I'd suggest these two:

1) the location of the coordinate system in your main assembly that is used to constrain part A can be changed because it is defined as offset from default.  Hence, the 3 translations and 3 rotations are readily accessible dimensions that can be modified by relations.

 

2) you build 2 constraint sets for part A - one constraint set is where the part is coincident with a coordinate system in the left position, and the 2nd constraint set is where the part is constrained to (another) coordinate system on the right side.  You can switch between the active constraint set using relations that involve the PTC_CONSTRAINT_SET variable.

5-Regular Member
January 1, 2023

Hi thanks for your time on this,

 

for the 1st option, could you please give me one examples for changing the co ordinate position in relation?

tbraxton
22-Sapphire II
tbraxton22-Sapphire IIAnswer
22-Sapphire II
January 1, 2023

Create a conditional statement to set the offset transform matrix entries. The video shows that by testing the value of the configuration parameter, the location of the assembly csys is modified to shift the component. In this case, only 1 of the six transform matrix entries must be altered to place the component.

 

The pseudo code would look like this assuming there are only two variations configuration A or configuration B:

 

 

If configuration==A

 offset=-100 (assemble subasm on the left)

else

 offset=100 (assemble subasm on the right and configuration B is implied)

endif

 

The Creo syntax to implement this is:

IF CONFIG=="A"
 $D28=-100
ELSE
 $D28=100
ENDIF

 

 

 

tbraxton_0-1672601593350.gif