VSXML Documentation

KISTERS AG

Fileversion 12


Table of contents

Validation

Upgrade old VSXML

For hassle free validation of VSXML files the <VSXML> node is required to have the following three attributes defined:

Newer versions of 3DViewStation add these attributes per default, if you got a VSXML file without them please feel free to add them using any text editor.

Note

The xsi:schemaLocation="http://viewer.kisters.de/VSXML VSXML.xsd" specifies the location of the XSD file to validate against.
If the VSXML.xsd file is not located next to your VSXML file you have to either remove this attribute or update the path to the XSD file on you system.
Please just update the last part of the attribute's value and leave http://viewer.kisters.de/VSXML as it is.

Visual Studio Code

Necessary extension: XML Extension by Red Hat

RedHat's extension supports different ways to validate XML files as described in this GitHub wiki article.

This extension requires the <VSXML> node to contain all attributes described in Upgrade old VSXML.
If that's the case and the XSD file can be found, the extension should provide IntelliSense and auto validation capabilities automatically.

Notepad++

XSD validation can be done using the Xml Tools plugin, the latest version at the time of writing is version 3.1.1.1.
Go to Plugins -> Plugin manager -> Show Plugin manager, search for Xml Tools, check the plugin's list entry and click on Install.
Notepad++ will restart for installation.

If the VSXML contains an xsi:schemaLocation attribute (see above) the plugin automatically validates against the XSD file defined in it otherwise the plugin will prompt you to manually select an XSD file for validation.

Note For validation to work correctly please ensure that the <VSXML> node contains at least the xmlns="http://viewer.kisters.de/VSXML" attribute mentioned in Upgrade old VSXML.

VSXML

Attributes

NameType
Version
[optional]
String
FileVersion
[optional]
Integer
Created
[optional]
String
UnitScale
[optional]
Float
Calibration2D
[optional]
Float
UpVector
[optional]
UpVector

Children

NameType
BoundingBox
[optional]
BoundingBox
Node
[several]
Node

Example


Node

Children

NameType
Attribute
[optional]
[several]
Attribute
VectorExport
[optional]
VectorExport
Constraints
[optional]
Constraints
RenderState
[optional]
RenderState
BoundingBox
[optional]
BoundingBox
Node
[optional]
[several]
Node
PhysicalProperties
[optional]
PhysicalProperties
Animation
[optional]
Animation

Additional PMI node children

NameType
Anchors
[optional]
PMIAnchors
LockVectors
[optional]
PMILockVectors
PMIText
[several]
PMIText
LeaderLines
[optional]
PolyLines
TextLines
[optional]
PolyLines
PMIReference
[several]
PMIReference

Additional Dimensioning node children

NameType
HelperLines
[optional]
PolyLines

Attributes

NameTypeDescription
Id
[optional]
IntegerId of the node.
Type
[optional]
NodeTypeType of the node
Root only allowed on first level!
CustomId
[optional]
StringCustom node id.
Name
[optional]
StringNode name
FileName
[optional]
FileNameRelative or full file path for Desktop / ActiveX
Relative file path in ModelRepository for WebViewer
Importing 3DVS or native CAD Model to a node
Dimensioning
[optional]
Integer 
Material
[optional]
Material 
Color
[optional]
ColorColor and transparency of the node
A
[optional]
AlphaNode alpha
Ignored if Color is used
RGB
[optional]
RGBNode color
Ignored if Color is used
ColorOverwrite
[optional]
NodeColorOverwriteSpecifies which color is used
Geometry
[optional]
IntegerGeometry Id
UnitScale
[optional]
Float 
Transformation
[optional]
TransformationTransformation matrix
Translation
[optional]
Vector3f 
Rotation
[optional]
Vector4f 
Scale
[optional]
Vector3f 
Show
[optional]
BoolInitial node visibility
If not defined default visisibility is true
You can set the initial visibility by VSXML Show attribute in UpdateScene or ImportVSXMLToNode. Default is true ("1") if not defined in VSXML.
Same attribute is used by VSXML in SetNodeProperties. No change of visibility if not defined in VSXML.
Ghost
[optional]
Bool 
Replace
[optional]
Integer 
TransparencyOverwrite
[optional]
BoolSpecifies whether the node color is used regardless of transparency
Constraints
[optional]
Integer 
CalloutId
[optional]
Integer 

Additional PMI Node Attributes

NameTypeDescription
MarkupType
[optional]
Integer
For possible values see MarkupType
 
ScreenAligned
[optional]
Bool 
Zoomable
[optional]
Bool 
AlwaysOnTop
[optional]
Bool 
ShowBackground
[optional]
Bool 
Immutable
[optional]
Bool 
AlwaysHighlightReference
[optional]
Bool 
Frame
[optional]
Integer 
ShowFrame
[optional]
Bool 
FrameType
[optional]
Integer
For possible values see FrameType
 
Alignment
[optional]
Integer
For possible values see MarkupAlignment
 
CameraScaling
[optional]
Float 
ParallelPosition
[optional]
Vector3f 
BillboardPosition
[optional]
Vector3f 
FixedPosition
[optional]
Vector2f 
ParallelAnchor
[optional]
Vector3f 
LineEnd
[optional]
Integer 
BackgroundColor
[optional]
Color 
TriangleColor
[optional]
Color 
Label
[optional]
String 
Anchor
[optional]
Integer 
BackgroundVertices
[optional]
String 

Additional 2D document attributes

NameType
DocumentId
[optional]
Integer

Example

 

Attribute

Note
3DViewStation versions prior to version 2020.1.385 require the following attributes to be lower cased, i.e. key and value.
From 2020.1.385 on you can use any casing.

Attributes

NameTypeDescription
KeyStringAttribute Name
ValueStringAttribute Value

Example


VectorExport

Defines how a node is exported to DXF.

Attributes

NameTypeDescription
ExportColor
[optional]
Color 
HLRMode
[optional]
HLRModeHidden Line Removal
Block
[optional]
BlockDXF group
(eg. AutoCAD can highlight this blocks)
Layer
[optional]
LayerDXF layer
LineReductionMode
[optional]
LineReductionMode 

Example

Constraints

Defines which attributes can not be changed after loading.

Attributes

NameTypeDescription
Cut
[optional]
Bool 
Show
[optional]
Bool 
Color
[optional]
Bool 
ColorOverwrite
[optional]
Bool 
Material
[optional]
Bool 
Transparency
[optional]
Bool 
Ghost
[optional]
Bool 
TransparencyOverwrite
[optional]
Bool 

Example


RenderState

Attributes

NameTypeDescription
Cuttable
[optional]
BoolSpecifies if this geometry can be cut by sectioning.

Example


BoundingBox

Attributes

NameType
Center
[optional]
Vector3f
Extents
[optional]
Vector3f
Orientation
[optional]
Vector4f , quaternion

Example


VsxmlBoundingBox

Attributes

NameType
Center
[optional]
Vector3f
Extents
[optional]
Vector3f

Example


PMIAnchors

Child Elements

NameType
Anchor
[several]
PMIAnchor

PMIAnchor

Attributes

NameTypeDescription
ConnectedNode
[optional]
IntegerId of the connected node
EndType
[optional]
Integer
For possible values see AnchorEndType
 
ConnectionType
[optional]
Integer
For possible values see AnchorConnectionType
 
Color
[optional]
Color 
Position
[optional]
Vector3f 
KnockOut
[optional]
Bool 
Visible
[optional]
Bool 

PMILockVectors

Attributes

NameType
Position
[optional]
Vector3f
Direction
[optional]
Vector3f
Normal
[optional]
Vector3f

PMIText

Attributes

NameType
Size
[optional]
Float
GeometrySize
[optional]
Vector2f
UseModelUnits
[optional]
Bool
Color
[optional]
Color
Transformation
[optional]
Transformation
Font
[optional]
String
Content
[optional]
String
Attribute
[optional]
Integer

PolyLines

Child Elements

NameType
Line
[optional]
PolyLine

PolyLine

Child Elements

NameType
Vertices
[optional]
PolyLineVertices

Attributes

NameType
IsLinelist
[optional]
Bool
Color
[optional]
Color

PolyLineVertices

Attributes

NameTypeDescription
NumVertices
[optional]
Integer 
Coordinates
[optional]
StringList of Vector3f elements separated by spaces.
Example: "1.0 2.0 3.0 1.0 2.0 3.0"

PMIReference

Attributes

NameType
NodeId
[optional]
Integer
Type
[optional]
Integer
Indices
[optional]
String
List of integers, e.g. "1 2 3"
Color
[optional]
Color

PhysicalProperties

Attributes

NameType
Density
[optional]
Float

Animation

Attributes

NameType
RotationSpeed
[optional]
Float
CoordinateSystem
[optional]
UnsignedLong

Appendix

Types

Alpha

8bit hexadecimal value representing a color's alpha channel.


AnchorConnectionType


AnchorEndType


Block

Limited to 31 characters to provide DXF R14 compatibility

Letters: A - Z

Numbers: 0 - 9

Special characters: "$", "_", "-"


Bool

"1" as true and "0" as false.


Color

For "Color" its an 32 bit ARGB color.


###HLRMode


FrameType


Layer

Limited to 31 characters to provide DXF R14 compatibility

Letters: A - Z

Numbers: 0 - 9

Special characters: "$", "_", "-"


LineReductionMode


MarkupAlignment


Material


NodeColorOverwrite


NodeType


Markup Type

Note: Markup type values might be required in Integer form.
They are numbered in ascending order, i.e. Text has the value 1, Dimension has the value 2 and so on.


Quaternion

(XYZW)$$$$⇑⇓$$$$X Y Z W

Example:

(0.2390.3700.0990.892)

RGB

24 bit color value.


Transformation

4 x 4 Matrix written as space separated String. (Row 1 to 4) See Transformation matrix for detailed information.

(m11m12m13m14m21m22m23m24m31m32m23m34m41m42m33m44)$$$$⇑⇓$$$$m11 m12 m13 m14 m21 m22 m23 m24 m31 m32 m33 m34 m41 m42 m43 m44 

Example:

(10000100001010.50.055.551)

String

A simple string.


Float

A floating point number


UnsignedLong

A 64bit unsigned integer value.


UpVector

String value, valid values are


Vector2f

Vector of two floating point numbers.

Example

"1.0 2.0"


Vector3f

Vector of three floating point numbers.

Example

"1.0 2.0 3.0"


Vector4f

Vector of four floating point numbers.

Example

"1.0 2.0 3.0 4.0"


Calculations

Transformation matrix

Identity matrix (no rotation, no movement):

(1000010000100001)



Movement X, Y or Z axis change the last part:

(100001000010XYZ0)

For simple rotations change the first part of the transformation matrix.

Reference orientation (no rotation, identity matrix):

(100010001)

which equals:

row1row2row3
1 0 00 1 00 0 1

  

  
Rotation by 90 degrees about y axis:  
(001010100)

which equals:

row1row2row3
0 0 10 1 0-1 0 0

  

  
Rotation by 180 degrees about y axis:  
$$  
\begin{pmatrix}  
{ \color{Red}-1 } & { \color{Red}0 } & { \color{Red}0 }\  
{ \color{Red}0 } & { \color{Red}1 } & { \color{Red}0 }\  
{ \color{Red}0 } & { \color{Red}0 } & { \color{Red}-1 }\  
\end{pmatrix}  
$$  

which equals:

row1row2row3
-1 0 10 1 00 0 -1

  

  
More samples for simple rotations  
http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToMatrix/examples/index.htm  

http://www.euclideanspace.com/maths/geometry/affine/matrix4x4/index.htm

Math on computing the rotation matrix You can compute rotation from any angle about an axis using this formula.

Basic rotations

A basic rotation (also called elemental rotation) is a rotation about one of the axes of the Coordinate system. The following three basic rotation matrices rotate vectors by an angle $$ \theta $$ about the x, y and z axis, in three dimensions, using the right hand rule - which codifies their alternating signs. (The same matrices can also represent a clockwise rotation of the axes)

Rx(θ)=(1000cosθsinθ0sinθcosθ)
Ry(θ)=(cosθ0sinθ010sinθ0cosθ)
Rz(θ)=(cosθsinθ0sinθcosθ0001)

For column vectors, each of these basic vector rotations appears counter-clockwise when the axis about which they are located points toward the observer, the coordinate system is right-handed, and the angle $$ \theta $$ is positive. $$ R_z $$, for instance, would rotate a vector aligned with the x-axis towards the y-axis, as can easily be checked by operating with $$ R_z $$ on the vector (1,0,0):

Rz(90°)=(100)=(cos90°sin90°0sin90°cos90°0001)(100)=(010100001)(100)=(010)

This is similar to the rotation produced by the above mentioned 2-D rotation matrix.