Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Is there a way to set a Property with the name of the FeatureScript a part was created by?

timo_schmidtimo_schmid Member Posts: 36 EDU
I have a featurescript that produces different parts, and I usually apply it multiple times in one part studio. 
When exporting the BOM it would be great to have a Propertiy that tells me with which FS a part was created (e.g. "script name" 1, "script name" 2, "script name" 3 etc.) 
Is there a way to add this as a property directly from the FeatureScript?
Thanks for your help,
Timo

Best Answer

Answers

  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,935 PRO
    Yes, i believe it is setproperty()

    But i don't know about adding an automatic number behind it. 
    Unless you set a variable in the context of the partstudio and have the fs increment that. Each time
  • timo_schmidtimo_schmid Member Posts: 36 EDU
    Hi @john_mcclary
    Thanks for your answer. I think think this sounds promising, but I don't know how I can set a variable in the context of a partstudio (or how I could increment the variable from within the featureScript)?
    It would be awesome if you could quickly explain how this can be done.
    Thanks,
    Timo
  • timo_schmidtimo_schmid Member Posts: 36 EDU
    Thanks a lot for writing the example Script! It was very helpful.
    I'll see if I figure it out with the testing, and otherwise it's fine with the second feature.
    Cheers,
    Timo
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,935 PRO
    👍
Sign In or Register to comment.