Set Object Node

Purpose

Opcode format

Opcode

[ASCII] (Hex)

Operand Format

Comments

Extended ASCII

(Node

<ws><INodeNum>[<ws><TNodeName>])

ASCII readable integer, optional string name

Single-byte, binary operand

[N] (4E)

<ULNodeNum>

32-bit unsigned integer (absolute value)

Single-byte, binary operand

[n] (6E)

<SNodeNum>

16-bit signed relative offset

Single-byte, binary operand

[Ctrl-N] (0E)

 

Auto increment +1 from previous node value

NodeNum The node number which will be assigned to the geometric primitives that are subsequently created. A NodeNum of zero indicates that no node attribute will be applied to subsequent primitives (until the next node is encountered, of course).  In ASCII form, the highest node number allowed is 4294967295.

NodeName An optional ASCII text string that names the node number specified.

Details

Opcodes in a .dwf file can be assigned to a specific node, which is a grouping of opcodes that can later be referenced from external metadata.  For example, in a mechanical drawing, a node can be used to specify multiple primitives belonging to a particular part. 

To put it plainly, the node attribute is essentially another layering mechanism (albeit without visibility control).

A node attribute is attached to a specific set of opcodes by surrounding them with a pair of Node opcodes: the first with a NodeNum (and optionally a NodeName) specified and the second with a zero NodeNum:

(Node 1 ‘Door‘) The node will be attached to subsequent geometry.
L 10,10 35,35 This line is attached to node 1, the Door node.
L 0,10 30,30 This line is attached to node 1, the Door node.
(Node 0) Subsequent geometry will not be attached to a node.
L 40,40 75,75 This line is not be attached to a node.

As with layers, only one node is active at a time. If a node is active in a .dwf file and a second node is specified, only the second node “takes over” and applies to subsequent geometric primitives.

Notes

A geometric primitive has a maximum of one node attached to it.  Also, primitaves in nodes may reside on different layers. 

Nodes do not affect the drawing order of geometric primitives. It is possible to have two nodes where some primitives of the first node are drawn before some primitives of the second node and vice versa. To accomplish this, return to a given node after specifying contents for another node. For example, three lines are drawn in the order in which they appear in the file:

(Node 1 ‘Door‘) The node will be attached to subsequent geometry.
L 10,10 35,35 This line is attached to node 1, the Door node.
(Node 2 ‘Window‘) Subsequent geometry uses node 2.
L 0,20 20,20 This line is on node 2, the Window node.
(Node 1) Return to node 1.
L 20,10 45,35 This line is attached to node 1, the Door node.