Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
String Parameter won't reference a Text Config Variable
sam_parsons
Member Posts: 43 PRO
Hey Guys,
I'm trying to use a custom feature to assign materials to parts. But I'm getting tripped up by the string parameter. I can't seem to configure the parameter using a text config variable? Presumably because "#" becomes part of a string and loses it's ability to signify another variable?
Here is the annotation in FS:
Sam
I'm trying to use a custom feature to assign materials to parts. But I'm getting tripped up by the string parameter. I can't seem to configure the parameter using a text config variable? Presumably because "#" becomes part of a string and loses it's ability to signify another variable?
Here is the annotation in FS:
annotation { "Name" : "Core Material", "Default" : "Default" } definition.coreMat is string;Any thoughts would be greatly appreciated!
Sam
Tagged:
0
Comments
So instead of
use
Keep in mind that this will allow just about anything to be entered - variables, functions, numbers, booleans, and of course text strings. To insure whatever is entered is treated as a string later in the FS, you may need to typecast via toString().
See an example function I have for doing that below:
IR for AS/NZS 1100
If you put the code above in your FeatureStudio, you can then use it in your code just after the end of the precondition:
IR for AS/NZS 1100
Unfortunately not
IR for AS/NZS 1100