Description
Allows batch upload of Model. See
Input is the model name, model type, external parameters, internal parameters, attachment and line.
In case of error, ErrorNumber and Error Description are returned.
For a list of fault codes, see XML Faults.
Interface
<interfacename> |
SWAddModel |
|
| ||
---|---|---|---|---|---|
<sessionid> |
Id |
Id of the active session |
|
|
Parameters
<secure> |
Secure |
Security flag. |
<modelinfo> |
ModelInfo |
The Model Info to be sent. Parent of <model>, <modeltype>, <param>, and <attachment>. |
<model> |
ModelName |
Name of the model. |
<modeltype> |
ModelType |
The type of model. ex: sldprt, sldasm, etc. |
<param> |
Param |
Used to define each parameter which has a mapped external parameter. |
<swparameter> |
SWParameter |
The Solidworks Internal Parameter |
<attachment> |
Attachment |
The supporting tags for Model Encoding. |
<line> |
Line |
The actual model zip file is encoded and sent. Child element of <attachment> |
Return Values
<success> |
Description |
Success description |
Fault Values
<faultcode> |
ErrorNumber |
Error code |
<faultstring>
|
Description |
Description of the error |
Remarks
<param attr=""> : Is used to define each parameter which has a mapped external parameter
The Attr stands for the External Parameter
Ex: <param attr="Width">
<swparameter> : The Solidworks Internal Parameter
Ex: <swparameter>SWBox@Width</swparameter>
Sample SOAP/XML Request
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWAddModel</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<interfaceparameters>
<secure>off</secure>
<modelinfo>
<model> </model>
<modeltype> </modeltype>
<param attr="">
<swparameter> </swparameter>
</param>
<attachment>
<line> </line>
</attachment>
</modelinfo>
</interfaceparameters>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample SOAP/XML Success Response
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWAddModel</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<success>Description</success>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sample SOAP/XML Error Response
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<interfacename>SWAddModel</interfacename>
<sessionid>0000</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<sessionid>0000</sessionid>
<success>Description</success>
<faultcode>0000</faultcode>
<faultstring>Description</faultstring>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>