The following document describes XML tag/attribute elements that have been added to the 3D PartStream XML interface to let clients format 3D model view output – e.g., to change the background color or font, to add a border, etc.
XML elements to specify format parameters all have the tag <model_format>. They are distinguished by the value of the param attribute. So, for example, background color is specified by an element of the form:
<model_format param=”bgcolor”>#006699</model_format>
Using the same tag for all entries makes it possible for the VB code to remain unchanged as new parameters are added.
The following parameters are defined:
param |
Meaning |
Range |
Default |
bg |
Overall background color |
#000000-#FFFFFF, or white, red, blue, black, etc. |
#006699 |
w |
Overall width, in pixels |
|
650 |
h |
Height of model output, in pixels |
|
450 |
fs |
Font size supplied to HTML <font> tag - i.e., currently not using <style> tag |
1-7 |
2 |
ff |
Font face supplied to HTML <font> tag |
e.g, "Arial" or "Times New Roman" |
"Times New Roman" |
fc |
Font color supplied to HTML <font> tag |
#000000-#FFFFFF, or white, red, blue, black, etc. |
white |
ab |
"All border" - i.e., width in pixels of border around entire output |
|
0 |
abc |
"All border color" - i.e., color of border around entire output |
#000000-#FFFFFF, or white, red, blue, black, etc. |
black |
mbg |
Background color of model output only. |
#000000-#FFFFFF, or white, red, blue, black, etc. |
Same as bg |
mb |
Width in pixels of border around model output only |
|
0 |
mbc |
Color of border around model output only |
#000000-#FFFFFF, or white, red, blue, black, etc. |
black |
lp |
Position of logo in the output |
1=UL, 2=UC, 3=UR, 4=LL, 5=LC, 6=LR |
1 |
ls |
Size of logo |
1=small, 2=big |
2 |
kp |
Position of "key" (explanatory text) in the output. See also "key indentation" |
1=top, 2=bottom |
1 |
kin |
Key indentation - i.e., space to the left of the key; Provides fine control over key placement. |
Any valid value for HTML width attribute. e.g., 20% or 100. |
0 |
kbg |
Background color of key only. |
#000000-#FFFFFF, or white, red, blue, black, etc. |
Same as bg |
kb |
Width in pixels of border around key only |
|
0 |
kbc |
Color of border around key only |
#000000-#FFFFFF, or white, red, blue, black, etc. |
black |
Remarks
For color parameters, bg, fc, abc, etc., do not worry about URL-encoding the data (e.g., converting "#" to "%23".) This is handled by the software that services the request.
Key position is controlled using an indentation value rather than a left/center/right alignment. This allows the left-justification of the text lines to be preserved.
Example
The following XML request displays output on a white background. The 3-D model itself is 500x300 pixels on a background color #F0F0F0, with a 1-pixel border of color #C0C0C0. The font is Arial, size 2, black. The logo is small and positioned at the lower right. The key is positioned at the lower left.
<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>SWGetModelView3D</interfacename>
<serviceuser>Publish3DAdmin1</serviceuser>
<password>Publish3DAdmin1</password>
<catalog>Publish3D</catalog>
<sessionid>2044340874</sessionid>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<interfaceparameters>
<model>SamplePart</model>
<model_format param="bg">white</model_format>
<model_format param="w">500</model_format>
<model_format param="h">300</model_format>
<model_format param="fs">2</model_format>
<model_format param="ff">Arial</model_format>
<model_format param="fc">black</model_format>
<model_format param="lp">6</model_format>
<model_format param="ls">1</model_format>
<model_format param="mbg">#F0F0F0</model_format>
<model_format param="mb">1</model_format>
<model_format param="mbc">#C0C0C0</model_format>
<model_format param="kp">2</model_format>
</interfaceparameters>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>