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 i use script of created part for making custom feature script?
gediminas_zdanys
Member Posts: 2 ✭
Best Answer
-
rmb (right mouse button) on the part studio then click on show code:

gediminas_zdanys I might recommend a starting point to featurescript:
The documentation has no fluff and every sentence has to be considered carefully. It's all in there and some of us have to read it many times to understand, especially me.
We're all beginning, so please post questions and when you figure something out, please share.
5
Answers
-
@gediminas_zdanys, Yes you can use it for creating your own feature script.0
-
Haw can i see this script? sorry for noob question.0
-
rmb (right mouse button) on the part studio then click on show code:

gediminas_zdanys I might recommend a starting point to featurescript:
The documentation has no fluff and every sentence has to be considered carefully. It's all in there and some of us have to read it many times to understand, especially me.
We're all beginning, so please post questions and when you figure something out, please share.
5 -
Wow, I didn't know you could look at the code that generates a part studio. It does bring up an interesting question. Could I backup/recreate an entire part studio by copy/pasting this code into a FeatureScript? I don't really know what the use case for this would be. It's more of an academic question.0
-
I've been trying to take part generated featurescript and copy it into my own featurescript. While it's simple in concept, I'm finding the implementation to be less practical.
I haven't ruled it out yet, but on the surface it doesn't seem like an easy way to build a custom feature script. Let me know if you figure something out.
1 -
billy, your tip is a good way to construct full part!
But what about the feature tree?
If we just copy wrap of build function (from Part Studio code) in our custom function and call it like a custom feature, we just have single feature in the tree.
I would pleasure to know how we can constructed part that consist of our custom features (and we can see them into feature tree).
Did you do something like that?
0 -
The feature tree is a listing of feature scripts. To mimic the tree creation, you'd have to re-create each feature in the tree separately.
Or, you can expose a few parameters and create a super feature.
Each feature script produces one line item in the tree.
0 -
I must me doing something wrong but how can I copy-paste portions of FS code shown in part studio. FS representation is in view only thus can't select code. And I certainly don't want to have to type it due to number of code lines.0
-
@Josy_La
You should be able to select and copy from the view-only code, you just can't modify it.
If you can't, that's a bug. What OS/browser are you using?
0 -
I am using Google Chrome0
-
My mistake I can use ctrl-c/ctrl-p but I was expecting I could right-click with mouse.0





