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.

Options

How to export Onshape model for use in Simulink using smexportonshape('URL')

I'm getting this error when running the command:

"Error using smexportonshape_implementation
The server returned the status 403 with message "Forbidden" in response to the request to URL
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape (line 38)
xmlFileName = smexportonshape_implementation(url, varargin{:});"

The link then leads to a page with this on it:

"{"message":"Unauthenticated API request", "status":401}"

The Step files are all generated properly but it fails before the XML file is generated. I was also able to run this command successfully using an example from Mathworks so I'm not sure where the issue may lay. Any help is appreciated!

Answers

  • Options
    matthew_mueller537matthew_mueller537 Member Posts: 24 PRO
    Hello. I would first make sure you're following all guidelines on the MathWorks site about the Onshape connector. It is only made for Assemblies (not Part Studios) and you should make sure the assembly and any subassemblies have a fixed component that can serve as your reference frame. 
  • Options
    samuel_razumovskiysamuel_razumovskiy Member Posts: 4
    Hey Matt, I am using an assembly and I have everything fixed properly. This is a pretty simple model with a few part studios and a single assembly.
Sign In or Register to comment.