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.
Can't figure out how to "retrieve" bodies created by instantiator...
eric_pesty
Member Posts: 1,875 PRO
I don't think I can use "qCreatedBy" and I can't use the "instantiator" variable directly...
For context I am adding instances within a loop and I would like to apply a transform to all the bodies at the end.
I had created a query that worked fine in my test case but it also moves everything else that's already in the part studio (which makes sense) so that was an epic failure.
I'm sure there's got to be a way to do this but I haven't worked with the instantiator before and it's a bit of a different animal from what I'm used to...
For context I am adding instances within a loop and I would like to apply a transform to all the bodies at the end.
I had created a query that worked fine in my test case but it also moves everything else that's already in the part studio (which makes sense) so that was an epic failure.
I'm sure there's got to be a way to do this but I haven't worked with the instantiator before and it's a bit of a different animal from what I'm used to...
Tagged:
0
Best Answer
-
eric_pesty Member Posts: 1,875 PRONevermind, I figured it out!
I re-read through the "addInstance" documentation and found the hint in the optional "name" part.
For anyone reading this, it is done with qCreatedBy(id + "name of newInstanciator", entityType.XXXX). I was missing the "entityType" when I first tried it.1
Answers
I re-read through the "addInstance" documentation and found the hint in the optional "name" part.
For anyone reading this, it is done with qCreatedBy(id + "name of newInstanciator", entityType.XXXX). I was missing the "entityType" when I first tried it.