smexportonshape
Export a CAD assembly model from Onshape
Syntax
Description
generates the files that you need to import an Onshape® assembly model into the Simscape™
Multibody™ environment.multibodyDescriptionFile
= smexportonshape(assemblyURL
)
The assemblyURL
argument is the web address
of the Onshape assembly model to export. To obtain the web address,
open the Onshape model, select the assembly tab, and copy the
URL shown on your web browser.
The generated files include an XML multibody description file and a set of STEP files. The XML file identifies the bodies that comprise the model and defines their kinematic relationships. The STEP files provide the 3-D geometries of the bodies. By default, all files are stored in the current MATLAB® folder.
The multibodyDescriptionFile
output is the name of the XML multibody
description file. You must use the smimport
function with multibodyDescriptionFile
as input
argument to import the Onshape model into the Simscape
Multibody environment. The figure shows the export and import stages of the Onshape CAD translation workflow.
You must have an active Onshape account. The first time you use this function, you must give the Simscape Multibody Exporter access privileges to your Onshape account. The function uses these privileges strictly to access and export your Onshape models. Onshape software grants the function access via Javascript tokens that keep your login credentials and any user information secure and visible only to you.
To obtain the access tokens for your account, Simscape
Multibody software
requires you to log in to your Onshape account once per MATLAB session.
A secure Onshape log-in page opens automatically on the first
use of the smexportonshape
function of a MATLAB session.
You can revoke the access privileges granted to the Simscape
Multibody Exporter
at any time. You must, however, restore those privileges if you want
to export additional Onshape models. If you revoke the access
privileges, then on your next use of smexportonshape
an Onshape web
page opens prompting you to accept or reject a request to restore
those privileges.
adds a name-value pair argument to specify the folder in which to save the XML and STEP
files for the model.multibodyDescriptionFile
= smexportonshape(assemblyURL
,Name=Value
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017a