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

Getting partial parameter name from string value of other parameter

AgitAriffiandi
3-Visitor

Getting partial parameter name from string value of other parameter

Hi, all

I have this problem as follows:

I have a sheet metal part, with bend and unbend state. In the part drawing, at the unbend state view I create ordinate dimensions where one of dimensions can be defined as unbend length dimension. This dimension name begin begin with string "oad" and followed by an ID number (let's say the value is "123"). So, the dimension name defined as "oad123".

So far I have created parameter udn = ID_number (string value), and then I got stuck on how I include the value as a partial name of unbend length dimension.

Any help would be greatly appreciated.

-Agit-


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

Hi Agit Ariffiandi

If i understand your problem,you can extract value of parameter with extract() function ( in relations )

Exemple ( see screenshot 😞

UDN=oad123

UDN_VALUE=extract(UDN,4,3)

The first number is the start position, the 2nd is the number of charaters to extract

extract.PNG

Hope this help you

Regards

Vincent

Hi, Vincent

I think you misunderstood my explanation of the problem. Let me detail it below:


I have this sheet metal part that its unbend state as shown in the drawing as below:Capture1.JPG

If we toggle the dimension will be pictured as below:

Capture3.JPG

So, The unbend length dimension is 505.81 mm or can be described as parameter "oad216", where the "216" string value is equal udn. This value will be entered manually.


Now I have many sheet metal parts in an assembly, where I would like to insert all unbend length dimensions into a repeat region with some rules:


udn = ID_number (entered manually per each part), and

udv = "oad(udn)"


So, This "udv = oad(udn)" part that i would like to ask to all of you: How can I insert the value of udn as partial name of udv parameter?


Regards,


Agit

Agit,

in Part mode you can create relation:

udv="oad"+udn

I assume that udv and udn are String parameters.

Martin Hanak


Martin Hanák

Martin & Vincent,

Thanks for your reply.

It's almost there, leaving the problem of how we could inserted the value of udv = "oad216" (string) into a parameter name oad216 = 515.81 (real value).

Any solution on this matter?

Regards,

Agit

Agit,

recapitulation:

  • you have a part
  • inside the part there is a parameter udv containing String value oad216

Now you want to create Real parameter named oad216 containing value 505.81. Is it true ? If the answer is YES then you have to use AutoHotkey/AutoIt software to make a script, that does this for you.

Martin Hanak


Martin Hanák

I think you have the solution now.

Sorry for my mistake

Top Tags