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.
Configurations update: Edit FeatureScript IDs
kevin_o_toole_1
Onshape Employees, Developers, HDM Posts: 565
In addition to the other new features already mentioned, Onshape 1.78 added a piece of functionality specifically for the purpose of writing FeatureScript that builds configured Part Studios.
As you may already know, the user-facing names of configuration inputs and the user-facing names of configuration table rows can be edited at any time:
The above changes will only modify how the input is displayed. So, if another assembly, drawing, etc. refers a configuration of this part studio, changing these names will not break the reference in the other tab. Rather, the other tab will simply display the same configuration with a different name. The reason the above changes don't break references is that there is another, internal name for the configuration inputs and rows which is used inside of FeatureScript.
However, if you are writing a custom feature which builds a configured Part Studio, you will be directly using that underlying FeatureScript ID. Thus, it can be useful to change these IDs in order to make your custom features more readable, or to make the multiple part studios have matching FeatureScript IDs, or to follow some standard convention.
These changes can be made in a the new "Edit FeatureScript IDs" dialog:
TL;DR:
1) If you are not writing custom features, you should not need to edit these internal FeatureScript IDs
2) If you are writing custom features that build configured Part Studios, this dialog is how you can view and edit these FeatureScript IDs
3) When editing FeatureScript IDs, be aware that doing so will break the configurations of other existing tabs which reference the Part Studio you're changing
Happy FeatureScripting!
As you may already know, the user-facing names of configuration inputs and the user-facing names of configuration table rows can be edited at any time:
The above changes will only modify how the input is displayed. So, if another assembly, drawing, etc. refers a configuration of this part studio, changing these names will not break the reference in the other tab. Rather, the other tab will simply display the same configuration with a different name. The reason the above changes don't break references is that there is another, internal name for the configuration inputs and rows which is used inside of FeatureScript.
However, if you are writing a custom feature which builds a configured Part Studio, you will be directly using that underlying FeatureScript ID. Thus, it can be useful to change these IDs in order to make your custom features more readable, or to make the multiple part studios have matching FeatureScript IDs, or to follow some standard convention.
These changes can be made in a the new "Edit FeatureScript IDs" dialog:
TL;DR:
1) If you are not writing custom features, you should not need to edit these internal FeatureScript IDs
2) If you are writing custom features that build configured Part Studios, this dialog is how you can view and edit these FeatureScript IDs
3) When editing FeatureScript IDs, be aware that doing so will break the configurations of other existing tabs which reference the Part Studio you're changing
Happy FeatureScripting!
Tagged:
2
Comments
Could you share the document please?
IR for AS/NZS 1100
Owen S.
HWM-Water Ltd
Here's a link to the public doc:
https://cad.onshape.com/documents/d20ccf19a456f7079668526e/w/5e019db2362144468deed711/e/d613ad7a11057ff5816480f8
It's a very, very simple example which uses the instantiator FS, which is now part of the standard library.
Owen S.
HWM-Water Ltd
HWM-Water Ltd
https://forum.onshape.com/discussion/comment/50472#Comment_50472
HWM-Water Ltd