PPT_LOGO_4b
‹#›
© 2008 Autodesk
Autodesk Developer Network
Anchors
§Establish relations between objects, typically geometric, may define behaviour
§E.g. a door or window placed in a wall
§Database objects, can store member data
§Many sub types, major hierarchy:
§Anchor
§  AnchorToReference
§    AnchorEntityToCurve
§Example to check whether a geo object is anchored:
§
§2a - Aec Basics.vb > TestAnchor command
Dim geo As Geo = tr.GetObject(geoId, OpenMode.ForRead)
If geo.AnchorId.IsNull Then
  ' Not anchored
Else
  Dim anchor As Anchor = tr.GetObject(geo.AnchorId, OpenMode.ForRead)
  ' Further check anchor type...
End If
For instance, you can use an anchor to anchor a window or door to a wall. Use the AnchorId property to retrieve the anchor object id and thus access the anchor, check its type, etc.