Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I'm pretty sure I know the answer to this, but I'm going to ask anyway, hoping someone knows a way. Is there a way to have a string parameter look at a real number parameter.
For example I have a string parameter called "PART_DESC" the value is "1/4x4 SQ TUBE M@X". the "M@X" is for the miter angle of the tube. I want this to auto populate based on the angle parameter used to control the cut in the part.
I would appreciate any ideas on how to do this.
Solved! Go to Solution.
In Relations:
string_param = "1/4x4 SQ TUBE M@" + itos(angle_param) + "°"
assuming I've understood your requirement correctly (although you might have to use Symbol Palette in a drawing to get the degree sign, and clipboard it into the relation).
If it's not an integer it will, in fact, round up or down - I thought it only rounded down but I've just tested it (WF4) and itos(3.7) is "4"!
There's a function called "itos" - Integer TO String - which pretty much does what it says.
Getting it to round up is a little trickier (though entirely possible) but if your angle is an integer to start with, it should present no problem.
I can make the angle parameter an integer. How would I write the string parameter to use the integer parameter? Remember I want the integer to replace the X at the end of the string. "4 X 1/4 SQ TUBE M1@X"
In Relations:
string_param = "1/4x4 SQ TUBE M@" + itos(angle_param) + "°"
assuming I've understood your requirement correctly (although you might have to use Symbol Palette in a drawing to get the degree sign, and clipboard it into the relation).
If it's not an integer it will, in fact, round up or down - I thought it only rounded down but I've just tested it (WF4) and itos(3.7) is "4"!
That works perfectly and it rounding is far better then me writing a relation to round the angle. Knowing this I'm now wondering if I can incorporate this into a family table.
I don't know whether that will work directly, but you can include a calculated parameter in a family table. The only drawback is that you have to open and regen each instance individually to update its parameter value, AFAIK - there's no way to update the whole table.
I've been playing with this and so far I haven't found to do this in the family table. I was hoping to avoid using a calculated parameter, but I guess thats what I will have to do.
Thanks for the help.
The Family Table Tools->Verify command should recalculate the whole table.
I don't believe it recalculates relations and parameters in each instance, or if it does then they aren't stored back to the family table.
That was my experience last time I tried, anyway...
It repopulated the family table correctly simply by verifying the instances.