|
 |  | Entity
|
Entity Object
See also: Using entity objects.
| |

 |
Context property, read-only, Object.
Returns a Proto object that represents the PROTO context (namespace) for the specified entity. Returns Nothing, if the entity is in the global context (isn't part of a PROTO declaration).
|

| |

 |
Delete method.
Deletes the specified entity.
If the entity is a named node, PROTO or field declaration, all references to the entity will also be deleted. If the entity definition contains declarations that have references outside the specified entity, all such references will be deleted as well.
The following Visual Basic example removes all routes to a node labeled "L1".
Dim r As Route
For Each r In Document.Routes
If r.ToNode.Name = "L1" Then r.Delete
Next
|
|

| |

 |
Document property, read-only, Object.
Returns a Document object that represents the VRML file contains the entity.
|



| |

 |
Owner property, read-only, Object.
Returns an Entity object that represents the immediate owner of the specified entity. Returns Nothing for the toplevel entities (root nodes and PROTOs).
The following example checks that two fields have the same scope.
Set field1 = ...
Set field2 = ...
If field1.Owner Is field2.Owner Then MsgBox "Same scope"
|
|

| |

 |
Range property, read-only, ( [Flags] ) As Object.
Returns a Range object that represents the portion of a document that's contained in the specified entity.
Flags (Optional) Specifies the part of the entity text to include. Can be a combination of the following values from the enum of type VpEntityRange:
| Value | Part of the entity |
 |
| vprnAll = 0 (default) | All entity text with some whitespace padding |
 |
| vprnId = 1 | Typename of node, name of prototype declaration or field definition, source routed field name |
 |
| vprnName = 2 | Name of node (DEF), name of prototype declaration or field definition, source routed node name |
 |
| vprnBody = 4 | Body of node definition or prototype declaration (within braces), field value |
 |
| vprnDecl = 8 | Interface part (within square brackets) of prototype declaration, type of field declaration |
 |
| vprnKeyword = 16 | PROTO, DEF, USE, ROUTE, field, exposedField, eventIn, and eventOut keywords |
 |
| vprnId2 = 32 | Target routed field name |
 |
| vprnName2 = 64 | Target routed node name |
 |
For information about Range objects, see Using the Range Object.
|

| |

 |
Standard property, read-only, Boolean.
Returns True if the specified entity is a standard VRML node type declaration or a field of that node.
A standard entity is a read-only object - you can't change name, delete or modify by other ways standard entities. You can't also get text range for the standard entity, because it has no associated text.
The following example checks that a node has a user-defined type (is a PROTO-instance).
Dim node As Node
Set node = Document.Nodes("SomeNode")
If Not node.Prototype.Standard Then
MsgBox node.Name & " is a PROTO instance"
End If
|
|

|
|
|