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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How can you change part units using parameters or pro/program?

mhenry
2-Explorer

How can you change part units using parameters or pro/program?

We have a part that can be in either millimeters or inches. I would like to use the same file and toggle the part units using a parameter. How can this be done?


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

Mike, this can be done in J-Link by setting up a Model Program.
From the J-Link APIWizard:
A model program is a J-Link program specific to a particular solid model,
that is part or assembly. Pro/ENGINEER activates the start method for a
program when it loads the part into memory and activates the stop method
when it erases the part from memory.

J-Link has the model method SetPrincipalUnits which seems to do what you
are asking for.

Regards,
Bjarne



Mike Henry <->
02-10-2009 15:28
Please respond to
Mike Henry <->


To
-
cc

Subject
[proecad] - How can you change part units using parameters or pro/program?






We have a part that can be in either millimeters or inches. I would like
to use the same file and toggle the part units using a parameter. How can
this be done?
----------
mhenry
2-Explorer
(To:mhenry)

We are running wf2; the “SetPrincipalUnits” seems to be a new wf4 command.

This dose sounds promising; could you give more details as to when the use changes the parameter form inches to mm the jlink program know to change the unit to metric?

Mike,
you will have to program the logic into the J-Link programs start method.
How to do this will depend on you use case. It could be a simple question
on the command line or a dialogbox. Maybe some automation looking at units
on the assembly where the part is used.
When the logic has decided the units, call the SetPrincipalUnits with the
appropriate parameters.

See the "Solid > Solid Units" section and the "Setting Up J-Link > Setting
Up a Synchronous J-Link Program > Setting Up a Model Program" in the WF4
J-Link APIWizard for full details.

Bjarne



Mike Henry <->
05-10-2009 21:57
Please respond to
Mike Henry <->


To
-
cc

Subject
[proecad] - RE: How can you change part units using parameters or
pro/program?






We are running wf2; the ?SetPrincipalUnits? seems to be a new wf4 command.

This dose sounds promising; could you give more details as to when the use
changes the parameter form inches to mm the jlink program know to change
the unit to metric?

-----End Original Message-----
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags