cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

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

balan_m123
5-Regular Member

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

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

 

 

ACCEPTED SOLUTION

Accepted Solutions

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

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

View solution in original post

13 REPLIES 13

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.

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 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

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.

balan_m123
5-Regular Member
(To:pausob)

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?

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

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Ok,

so you define the offset coordinate system in your main assembly:

pausob_0-1672602250693.png

Note the dimensions you want to control:

pausob_1-1672602272106.png

 

Here is an example of the relation that determines the value of the d26 dimension:

pausob_2-1672602315533.png

 

So if the value of the parameter "PLACEMENT" is "RIGHT", then the coordinate system will be on the right side:

pausob_3-1672602360497.png

 

 

However: note that there is no need for relations or the "PLACEMENT" parameter if you simply use family table to manage the 2 configurations:

pausob_4-1672602824435.png

The relations and parameters add a layer of complexity that future users of these models might not understand.

Additionally, when using these assemblies as sub-components in another top-level assembly, the family table instances are easily identified in the model tree:

pausob_5-1672603179113.png

And the family table route is definitely more appropriate if this assembly is actually identified by a different part number depending on which side its sub-component A is installed.

balan_m123
5-Regular Member
(To:pausob)

Hi Thanks for your time on this,

 

I tried and its work fine, i can able to reposition the CYS but here associated part is not moving along with co ordinate position,

in the Pro program we need to have a 2 parts (Part-A & Part-A) in the model tree because its working the based on the Feature ID i understand,

 

if we need to assemble the part 2 times then changing the co ordinate system position is unnecessary i feel, Please correct me if i am wrong here. 

Yes, if you have a model with 2 parts (Part-A & Part-A) and you "add" the left or right one depending on the condition of the parameter "PLACEMENT", then having the coordinate system position change is unnecessary.  Are you looking for the syntax to do this in Pro/Program?

 

You would have provide more explanation in terms of images or uploaded models as I can't help with the problem of the associated part not moving along with the coordinate system.

balan_m123
5-Regular Member
(To:pausob)

Hello Thanks for your reply on my post,

 

i have attached a image, here i have a assembly and under this assembly one part has been assembled by co ordinate system in the left side, same part has to go to opposite side when i am changing the paramater as Right (see on top),

 

is that possible by changing the co oridnate position of the PRT0002? if so please shom me the syntax.

 

Thansk in advance

 

 

The conditional relations and video I posted earlier is a direct analogue to your scenario. You are using left/right as the parameter rather than A/B. All of the relations in a model are accessible in Pro/Program, it is not clear to me what you are missing from this thread to resolve the situation.

 

If you follow the guidance presented here, you will find it is a solution to capturing your design intent. 

 

Create a csys (offset from default asm csys) in the assembly that will position part002 as desired on the left side.

You need to assemble part002 in your example to the offset csys in the assembly and then move that csys from left to right.

Change the offset values of the csys locating part002 and it can be moved to the right side of the assembly.

 

Have you been able to follow the above three steps in your design and shift part002 from left to right?

If not, then start there and then worry about adding the relations to the model to automate it.

 

The relations to implement this are documented in my earlier post with both the pseudo code and the Creo syntax for the relations.

 

 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric
balan_m123
5-Regular Member
(To:tbraxton)

Hi,

 

When i am following your instruction, i can able to move the co-ordinate position but associated Part is not moving to opposite side because in the Pro program we need to have 2 parts it seems since its working based on the feature ID, if i need to assemble 2 times then no need to contrôle the CYS position?

 

SO that still looking for the best possibilities from others.

Please clarify the assertion that you need two parts (I assume this means 2 copies of part002 in your example image). As I show in the video posted above, a single copy of the part can be moved from the left to the right side using only relations with a conditional test. What about your design is requiring you to add two copies of the same part to the assembly?

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Hi @balan_m123 , I'm quite confused, and the graphic you last provided (PRO-PROGRAM.png) does not show the program, but basically illustrates the intent that you already stated in words in your original post.  What's not clear is why the solutions already provided in this thread do not apply / work for your application.

 

Maybe try again, and post screenshots of your actual model and of the pro/program code - showing the 2 components, the feature IDs, etc...

If you can publish a video of how the part stays in place when the coordinate system to which it is constrained moves?  That seems like a a curious bug... 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags