SWGetModelView2D

 

Description

Given a model name, a link to a viewable file for the model is returned.

 

For a list of fault codes, see XML Faults.

 

Interface

 

 

<interfacename>

SWGetModelView2D

Name of interface

<sessionid>

Id

Id of the active session

 

Parameters

 

<secure>

Secure

Security flag

<model>

ModelName

Name of the file to obtain

<enduser>

Enduser

Unique string logged in by every download or view request, optional

 

Return Values

 

<success>

Description

Success description

<returnval>

Hyperlink

Link to the necessary output

 

Fault Values

 

<faultcode>

ErrorNumber

Error code

<faultstring>

Description

Description of the error

 

Remarks

 

The ModelName represents the name of the model being requested.

 

The required login elements are <catalog>, <serviceuser>, and <password> &ldots;

 

If the required sessionid element is missing or is an invalid sessionid, the request performs the login if all SWSessionLogin elements are available.

The required login elements are <catalog>, <serviceuser> and <password> as documented in SWServiceLogin . These additional elements should be placed in the <interfaceparameters> element of the request.

 

The returned Hyperlink should be implemented using the following object tag:

 

<OBJECT ID="EModelViewControl"

CLASSID="CLSID:22945A69-1191-4DCF-9E6F-409BDE94D101"

codebase="http://www.solidworks.com/plugins/edrawings/download.cfm?Release=REL&Type=

WEB&Language=English#Version=3,1,0,000"

WIDTH="100%" HEIGHT="100%" VIEWASTEXT>

<PARAM name= "FileName" value="<returnval>Link>"></OBJECT>

 

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>SWGetModelView2D</interfacename>

        <sessionid>0000</sessionid>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

        <interfaceparameters>

            <secure>off</secure>

            <model>modelName</model>

        </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>SWGetModelView2D</interfacename>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

        <sessionid>0000</sessionid>

        <returnval>Link to the attachment</returnval>

        <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>SWGetModelView2D</interfacename>

    </SOAP-ENV:Header>

    <SOAP-ENV:Body>

        <sessionid>0000</sessionid>

        <returnval></returnval>

        <success>Description</success>

        <faultcode>0000</faultcode>

        <faultstring>Description</faultstring>

    </SOAP-ENV:Body>

</SOAP-ENV:Envelope>