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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

UDF Placement Orientation Axis Issues

cvansickle
7-Bedrock

UDF Placement Orientation Axis Issues

All,


We currently place a manufacturing UDF with a variant dimension that is an angle around an axis. We have found it best practice to always place this udf at a certain angle (5 degrees) and then modify the dimension to the desired angle after it is placed. We do this because the udf orientations get interpreted differently in different quadrants around the axis. While any input angle into this UDF looks fine in Pro, when the ncl is posted, it doesn't post right. This practice of changing the angle after it is placed works fine, until you try to programmatically place this UDF. Having an ID that changes depending on the part it is placed into, I cannot determine a way to get and handle on this dimension to programmatically change after the udf is placed. I have also tried manipulating the orientations at different input angles, but there are certain angles that will not post correctly no matter what I set them to.


Has anyone ever seen anything like this before? Or better yet, found a way around it? I am using the VB API.


Thanks,


Corey


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.
3 REPLIES 3


> This practice of changing the angle after it is placed works fine,
> until you try to programmatically place this UDF. Having an ID
> that changes depending on the part it is placed into, I cannot
> determine a way to get and handle on this dimension to programmatically
> change after the udf is placed.


If you change the symbol name of your dimensions in the UDF (i.e. from
d3 to X_ROT), those names will be preserved (if they're not already
being used) when the UDF has been placed. ProE will also try to preserve
the feature names (again, if they're not already being used). When you
need to change the dimension values after UDF placement, look for the
named dimensions using pfcSolid.GetItemByName().


Be sure to check results of BaseDimension.GetExtendsinNegativeDirection()
as ProE can be vague about dimensions that show as positive but really have
negative values.




Marc
--
Marc Mettes



In Reply to Marc Mettes:


>If you change the symbol name of your dimensions in the UDF (i.e. from
>d3 to X_ROT), those names will be preserved (if they're not already
>being used) when the UDF has been placed. ProE will also try to preserve
>the feature names (again, if they're not already being used). When you
>need to change the dimension values after UDF placement, look for the
>named dimensions using pfcSolid.GetItemByName().


Marc,


Thanks for the reply. Your solution is definitely a sound one, but the remaining issue is that we are looking to place the same UDF multiple times, with different rotations on each instance. Creating multiple UDFs with the same variable name and changing the variable with thatname would result in all the UDFs being placed at the same rotation angle, wouldn't it?

What I do when working with dimensions in UDF features:



1. The first feature owns some parameters (for example “ROT_X” of
double type) – this feature may have id 4711

2. The next features own FEATURE RELATIONS (not model relations) that
drive the dimensions (for example: $d6=ROT_X:fid_4711)



Then I create the UDF definition file *.gph.



3. Add the UDF as a group to your asm/prt (manually or by using the
API functions)

4. After creating the UDF you always have a handle to the group
feature.

5. You can modify the parameters of the first feature in the group.

6. Regenerate the model



Since the FEATURE RELATIONS are created correctly when Toolkit creates the
UDF this procedure is very stable.



Hope this helps.



Andreas


Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags