User Manual - Page 3256

For AUTOCAD 2011.

Loading ...
Loading ...
Loading ...
â–  Door and Window Assemblies
Registering this rule for other object types will not have any result. The Apply
method of that class that each rule needs to implement has the following
syntax in AecBoundingOpeningRule:
public abstract AecSpaceOffsetOpeningInfo*
Apply(Autodesk.AutoCAD.DatabaseServices.ObjectId idSpace,
Autodesk.AutoCAD.DatabaseServices.ObjectId idAdjSpace,
Autodesk.AutoCAD.DatabaseServices.ObjectId idObject,
Autodesk.AutoCAD.DatabaseServices.ObjectId idOpening);
The first argument is the ObjectId of the current space for which the boundary
offset is to be calculated. The second argument is the ObjectId of the adjacent
space. When there is no adjacent space, which is the case at exterior walls,
the value of this argument will be ObjectId.Null. The third argument is the
ObjectId of the object the opening is anchored to, which usually is a wall that
bounds the space and owns the opening. The fourth parameter is the ObjectId
of the opening that is under investigation. The following example shows the
framework for a new opening rule called BoundingOpeningRuleNet:
namespace AecSpaceOffsetStandardSample
{
public class BoundingOpeningRuleNet : AecBoundingOpeningRule
{
public BoundingOpeningRuleNet ()
{
RegisterType(typeof(Door));
}
public override AecSpaceOffsetInfo* Apply(ObjectId idSpace,
ObjectId idAdjSpace, ObjectId idObject, ObjectId idOpening)
{
}
}
}
Sample Bounding Opening Rule BoundingOpeningRuleNet
The following example shows a simple bounding opening rule, where an offset
is defined for doors. To make sure the rule is not applied to windows, it is only
registered for the Door object, so that AutoCAD Architecture will not call it
for any other openings. This rule is used in the sample project
3200 | Chapter 39 Spaces
Loading ...
Loading ...
Loading ...