Part/Body Type Property
phares
Member Posts: 15 ✭✭
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
-
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 -
Just 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 --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications1
Answers
-
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 -
Just 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 --- Renaissance --- Kestrel -- SmartLink
Experts in Onshape Automation - Custom Features and Integrated Applications1
