SWUpdateModel

 

Description

Allows update of a model.

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>

SWUpdateModel

Name of interface

<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

<modelinfo>

Model information

Model information received, including model, parameters, and attachment

   <model>

Name of model

Model name

   <modeltype>

Type of model

The type of model. ex: .sldprt, .sldasm, etc.

   <param attr= "">

Mapped internal parameter attributes

Used to define each parameter which has a mapped external parameter

       <swparameter>

Internal parameter

The SolidWorks Internal Parameter

<attachment>

Model encoding support tags

The supporting tags for Model Encoding

    <line>

Model zip file

Model file in zip format

<success>

Description success

Description success

 

Fault Values

 

<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>SWUpdateModel</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>SWUpdateModel</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>SWUpdateModel</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>