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.
Part/Body Type Property
phares_blank
Member Posts: 14 ✭✭
Forgive my ignorance, this is the first time I have played with featurescript.
Essentially, this is what I am trying to do:
if bodyType = sheetMetal then setProperty description "sheet metal"
From reading the documentation I was able to set the description but I cannot figure out how to filter only sheet metal parts.
OnShape seems to know if a part is sheet metal or not, I just need to know where that property is stored. Is there something like BodyType but for Sheet Metal, Frames, etc?
0
Best Answers
-
phares_blank Member Posts: 14 ✭✭Thanks to Alex's FeatureScript Examples I was able to figure this out using ActiveSheetMetal.YESSee the working FeatureScript hereI would also like to set the VENDOR property but it doesn't seem to work. Please take a look, I would love some criticism of my code.
0 -
Caden_Armstrong Member Posts: 177 PROJust note that ActiveSheetMetal will only work for active models. Once the finish sheet metal feature is added to the tree, it will no longer work.
Another way to check is seeing if there is a flat pattern for the body.
isQueryEmpty(context, qCorrespondingInFlat(mySheetMetalBody))www.smartbenchsoftware.com --- fs.place --- Renaissance
Custom FeatureScript and Onshape Integrated Applications1
Answers
Another way to check is seeing if there is a flat pattern for the body.
isQueryEmpty(context, qCorrespondingInFlat(mySheetMetalBody))
Custom FeatureScript and Onshape Integrated Applications