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.
Defining Libraries for Featurescript Usage?

I have a WIP Laser Kerf Bend featurescript that's been on backburner for quite some time and I've based the implementation partially on @MichaelPascoe's Texture feature which includes a lot of pre-defined solids to choose from for pattern seeding. The way he accomplished his "library" of solids was a lot of manual integration into the feature itself, and I'd like to implement something closer to the way the Frames and Forms libraries are integrated into their respective tools where I can separate out the library definition to another document to split up management of the code and geometry into their own things.
So far I have found no other examples outside of the standard library features of people using this functionality of Featurescript however, and I can find nothing in the standard library documentation that describes how to define one of these libraries for myself. Is this one of those things that isn't available yet for the public to mess with? @ilya_baran @lana ?
Comments
Yes, we're working on supporting this for custom features, but it's going to be a bit of time before it's available.
@Derek_Van_Allen_BD Can you not just copy the Forms feature then instead of making forms you make the parts you want, then insert them similarly? That's kind of like what I did with the Imprint feature, it uses the frame profile library as it's backbone for a user defined sketch profile library.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Kinda but that's not quite enough. Using form studios gets me the configurable seed geometry instances the way I'd like and I can make my own "laser kerf tools" library, but the thing I'm looking for is a way to bake the library definition ID into the feature so that whatever library I develop is kept loaded into the feature for others to use without needing to go digging for studios or rebuilding my library for themselves on their end. Currently I don't think it's possible to share frame or form libraries with other users and even if it was it makes it less likely for people to use the feature if they have two things to manage.
Curious how you implemented Imprint with that Default Purpose parameter as well, that seems like another bit of undocumented featurescript UI wizardry I might want to take advantage of.
Guess you'll have to do it the old fashioned way like Texture does =P (With standard enums and hard coded part studio imports)
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Maybe I'll split that bit out into its own studio and import it so I can cut it out when custom library support is finally in place.
Could you use a partstudiodata and use editing logic to set target document upon creation of the feature?
Doesnt prevent someone from selecting non-library geometry, but at least makes using it simpler.
Custom FeatureScript and Onshape Integrated Applications
What just like have it open up set to a default repository document full of tools? I guess that could work as a short term fix too but the drop menus and searchability of the new forms and frame tool library UI are kinda nice.