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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

relation

RonanMASSOT
1-Newbie

relation

Hi all, I would like to know how works the "if" function on a relation? I need to create a relation like: l=40 if L>55 & l=8 if L<55 someone can help me about this topic? Also, the distance L is define by the gap between 2 parts and I do not have any dimension. Is it possible to use an analysis result to define L value?
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
4 REPLIES 4

Ronan, Yes, it is possible to use the results of an Analysis feature in this context. The syntax you need can be achieved in a couple of ways, including: IF L>50 l=40 ELSE l=8 ENDIF (Note that this means that l=8 if L=50. If you want it the other way around, write "IF L>=50" instead.)\ David

Ronan, You may want a little more detail about using the Analysis Feature. If I'm not mistaken (which I may be), you need AAX (the Advanced Assembly Extension) to get what you need from Insert/ModelDatum/Analysis. Instead, you can use Analysis/Measure/Distance and pick Feature from the drop-down list (default: Quick). If this is your first such feature, it will appear in the model tree with the name ANALYSIS_DISTANCE_1, a name you can change if you wish. If you notice when creating (or redefining) the feature, it has within it a Feature Name called DISTANCE, which has the value you want to access. However, the syntax is a little tricky, certainly not obvious. Without doing anything else it would be: DISTANCE:FID_ANALYSIS_DISTANCE_1 to access the "L" of your question. The FID stands for FeatureID, and must be incuded with the colon and followed by the name of the feature. If you rename the feature to, say, A1, then it gets simpler: DISTANCE:FID_A1 OR, if you use the assigned Feature ID number which you can show in a Model Tree column (Settings), you might have, for example: DISTANCE:FID_127 To further simplify, change the Feature Name to D, and you have: D:FID_A1 One final note: because of the order of regeneration, you will probably have to regenerate twice to see the result of any changes. Good luck! David

P.S. It's not necessary to "type in" any of this. If you pick the [] icon in the Relations dialog Box, pick Feature from the drop-down list, then DISTANCE will appear in a Parameter list, and you can just pick it to place it in a relation.

Thank you very much, David! I've got found another solution, is to create a reference dim in the sketch, then use it like the L distance
Top Tags