Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

extrusion tool, value equal to part number nx12 1

Status
Not open for further replies.

manu1973

Aerospace
Sep 28, 2020
15
Hello,
I would like to know, if I can associate the value of "distance", of the extrusion tool, to an expression, for when I change the name of the part, change that value of the extrusion.
for example, if my piece is called "rectangulo_20", that "20" is the one that I want to appear in the "distance" value.
I have managed to isolate that number "20", with the expression:
last (splitstring (first (splitstring (ug_askcurrentworkpart (); ".")); "_"))
but I can't, bind the isolated value, to the "distance" value.
Thank you very much
Cheers
Manuel
 
 https://files.engineering.com/getfile.aspx?folder=6ae0d8f7-e01b-42f0-8840-a9a5f7981f40&file=extrude.JPG
Replies continue below

Recommended for you

I assume that you currently have a string expression with the value of "20"; let's assume it is named "t1". Now make a new expression (let's say "t2") of type number, dimensionality length, with the units you want. For the formula of "t2", use:
Code:
MakeNumber(t1)

This will convert your string value to a number value. Now in the feature dialog, change the dropdown to "formula" and choose your t2 expression. Alternately, enter "t2" (no quotes) directly in the distance input box on the dialog.

www.nxjournaling.com
 
got
Thank you very very much
you're the best
the fucking master
Cheers
Manuel
 
cowski ??

If I wanted to add more values, such as length and width, how would it be done ???

thank you
 
If you have a consistent file naming format, you could parse out the values from the name. See the last post in the following thread for an example:
thread561-351996

If you have a number of known part sizes, you might want to consider a part family as it would make maintaining the parts easier. Depending on your use case, a deformable part might also be useful.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor