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.

Import entities from different part studio

KiranKumar_TKiranKumar_T Member Posts: 11
Hi,
I am looking for a method to import a geometrical entity (for e.g. surface) from part studio with Feature script. Tried with PartStudioData(Filter: "PartStudioItemType.SURFACE") but not working. Please let me know if anybody have suggestions. Thanks.

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    Please take a look at Instantiator
    Senior Director, Technical Services, EMEAI
  • KiranKumar_TKiranKumar_T Member Posts: 11
    @NeilCooke Thanks for the reply. As i understand, instantiator duplicates complete part studio & not entity from part studio. Please correct me if i am wrong. 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    Correct. Instantiator brings in the entire context. In the past I have tagged entities in the Part Studio with attributes, then filtered the context by attributes. If you can’t get this to work I will share an example next week. 
    Senior Director, Technical Services, EMEAI
  • owen_sparksowen_sparks Member, Developers Posts: 2,660 PRO
    edited December 2019
    I believe the instantiator has some filtering. I recall being able to for for bodies only for example.
    Business Systems and Configuration Controller
    HWM-Water Ltd
  • KiranKumar_TKiranKumar_T Member Posts: 11
    To be specific, requirement is to select a surface from different part studio created by different user. Something similar to "Derived" option but through feature script. 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,683
    In that case, it’s easy. Take a look at reference parameters (there’s a code snippet in the menus at the top). You can see it in action in the Beams feature when adding a custom profile. 
    Senior Director, Technical Services, EMEAI
  • KiranKumar_TKiranKumar_T Member Posts: 11
    @NeilCooke It works great. Thanks for your time.
Sign In or Register to comment.