PPT_LOGO_4b
AutoCAD Architecture .NET API ‹#›
Copyright © 2009 Autodesk Inc.
用Anchor连接两个对象方法
1.获得或创建两个对象
2.
2.创建anchor
§如: AnchorOpeningBaseToWall anchor = new AnchorOpeningBaseToWall();
3.设置anchor的属性和参数
§ anchor.SubSetDatabaseDefaults(db);
§  anchor.SetToStandard(db);
§
4.用SetAnchor () 将anchor附加到对象1上
§如:window.SetAnchor(anchor);
§
5.将对象2与anchor 建立关联,通过Id的方式
§ anchor.CurveId = wall.Id;
–
§
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.