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.
Import sketch into feature without sketch being placed in part studio graphics area
shawn_crocker
Member, OS Professional Posts: 947 PRO
I can't figure this out. I have a feature that allows the user to select a sketch from a different part studio in the same way that the frames feature allows selecting one. For some reason, when using the feature, it seems like the feature is deriving the sketch into the part studio graphics area which is not needed for the feature to function. The feature is just capturing the attributes from the selected sketch. Does anyone know what to do to stop this. I have looked through the frames feature and I am not seeing anything obvious that is stopping that behavior.
Here is the feature which is currently functional if anyone is interested in looking or copying for there own use. The feature allows selecting objects within the part studio that are not frame parts(like imported geometry) and applies properties to them, basically converting them into frame parts using the attributes from a frame sketch. This might not be for everyone because it follow what my workflow is. In my company, we do not use the composite that is created by the standard frame features. 🤮. We apply the frame properties directly to the parts(using a customized cutlist feature) and use the parts directly. This is because, the composite method is extremely impractical and inflexible. I'll try not to get started ranting about it here but, the composite method seems like a total after though and a really bright band aid to an issue that amazingly, has not actually been revisited. 😤
Answers
You could make a new context to instantiate into (and use for downstream evaluation functions)
Or just instantiate into your current context, and then delete the sketch later with opDeleteBodies (this is what i usually do). I think this is what frame does - it has a cleanup step.
Experts in Onshape Automation - Custom Features and Integrated Applications
Thanks @Caden_Armstrong. That makes sense. I will run a delete on the sketch. 😊