§如: 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.