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.

Parametric design - namespaces, imports, refactoring and APIs.

preston_bannisterpreston_bannister Member Posts: 6
OK, first - I am a software guy, still feeling out CAD through Onshape (and printing the results on my basic additive 3D printer). So I could be wrong about any or all(!) of this.

Second, I do not pretend to have a good grasp (as yet) to best practices as to parametric CAD. That said, given all the incidental and flowery mention over the years of parametric CAD, I expected more. Bit of cognitive dissonance...

Third, as a software guy, I am of habit - structured, strict, and tend to address problems others think as impossible. Trying to fake things in my group is not a good idea. Been doing this a long time, and delivering (even on fuzzily defined problems ... especially).

Hacking my way through my first parameterized model. 

No namespaces on variables. Is this normal?

No named groupings of operations. Is this normal?

(Fillets are really cool ... but, yeh.)

No explicit imports from one part/namespace to the next. Is this normal?

No explicit APIs from one part to the next. (A repeat of the prior.) Is this normal?

If on reflection, I want to re-name a variable, it seems(?) I have to re-edit much of the design. No refactoring? Is this normal?

Fiddling around with a GUI is at first *MASSIVELY* more productive than declarative batch transformations ... but once past the experimental stage, I do want strict formal transformations. Past the first few iterations, I want to record strict recipes.

Am I entirely missing practice (quite possible), or is CAD both more and less capable than I thought?


  • doug_westdoug_west Member Posts: 2
    you should look into Featurescript.  It is the first and only language to create true parametric features programatically.  All of Onshape's features are written in it and publicly available.

  • preston_bannisterpreston_bannister Member Posts: 6
    Have looked a bit. Perhaps I missed something, but seems I can view but not edit the Featurescript for a model. Also seems(?) I cannot export and import the Featurescript for a model. (Would be nice to do some refactoring in a text editor, for operations not supported in the GUI.)
  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    feature script code of part studio is view only, but you can copy and edit standart library source features and create your own based on standart library documetation https://cad.onshape.com/FsDoc/

Sign In or Register to comment.