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.

Record a macro or create a shortcut to an action possible?

RichardBRichardB Member Posts: 3 PRO
Ok, A little background. We recently had an outage with Onshape (my employers problem as they forgot to pay). But it made them realise they lost all their CAD and IP while it was sorted (Medical sciences).

So I was tasked with finding a way to painlessly export our files once the design is locked. One click and the file is exported to Solidworks/parasolid or STEP and pops up a window to save location.

I'm a Mech/E not a softy. Normally i would use the capture/record macro function and create a button in Solidworks but I cannot find it or anything like it in Onshape. Can anyone advise?
Tagged:

Best Answer

  • caden_armstrong2caden_armstrong2 Member, User Group Leader Posts: 127 ✭✭✭
    Answer ✓
    Onshape doesn't support the same automation options as Solidworks (ie macros). The options for extending automation are limited to Featurescript - which cannot do exports, and integrated/API applications which require running an external application of some kind.

    Integrated applications can add "new buttons" into Onshape in a few locations, but considering that the current export option in Onshape is only 2 clicks you'd want an improvement over that. I've created solutions for clients that will export parts automatically - when a release is made, the parts are exported to dropbox/onedrive/etc in the background, no user action required. But this solution does require running a web server, developing an external API that supported registering webhooks for the new release notifications, and an integration into your storage solution.

Answers

  • caden_armstrong2caden_armstrong2 Member, User Group Leader Posts: 127 ✭✭✭
    Answer ✓
    Onshape doesn't support the same automation options as Solidworks (ie macros). The options for extending automation are limited to Featurescript - which cannot do exports, and integrated/API applications which require running an external application of some kind.

    Integrated applications can add "new buttons" into Onshape in a few locations, but considering that the current export option in Onshape is only 2 clicks you'd want an improvement over that. I've created solutions for clients that will export parts automatically - when a release is made, the parts are exported to dropbox/onedrive/etc in the background, no user action required. But this solution does require running a web server, developing an external API that supported registering webhooks for the new release notifications, and an integration into your storage solution.

  • RichardBRichardB Member Posts: 3 PRO
    Great reply caden_armstrong. Thank you.

    I guessed it may be a drawback of being browser based. I cannot physically change the settings of the software as the software is a web browser. I'm frustrated I cannot change the background from glaring white.

    The reason for a "no hassle" option was so that the engineers (me included) wouldn't have to consciously have to action the export other than click a button. Trying to get some to manually export and save the files is going against their "normal way of working" and will end up never happening.

    We wont be running a server so I guess I need to explore other options.

    Thanks again.
  • chadstoltzfuschadstoltzfus Member, Developers, csevp Posts: 142 PRO
    One of the great things about FeatureScript is ability to freely share your custom features with the entire Onshape user base with no overhead. Unfortunately, that freedom comes with some security concerns, which is why FS doesn't have the ability to do things like contacting other servers, forcing downloads/exports, or accessing the browser. A export/macro recorder would be a nice future improvement (see here for an IR you can upvote).

    However, Onshape being in a browser does provide a number of advantages, and one of them is being susceptible to client-side browser extensions. One that I use is Dark Reader. It's a Chrome extension that changes the CSS for assigned webpages. It's not perfect (sketches are a little hard to see for some) but I'd rather squint for a sketch than deal with a white screen all day. There are a number of IRs for dark mode on the forums, you can help out by upvoting here.

    Another thing about the API is that if you know a software dev (there are a lot on the forum like my friends over at CADSharp), they might be willing to help develop an application or even a page of code that you could locally execute without the need for a server. 
    Applications Developer at Premier Custom Built
    chadstoltzfus@premiercb.com
Sign In or Register to comment.