User Manual - Page 3267

For AUTOCAD 2011.

Loading ...
Loading ...
Loading ...
need to create the rule in the standards InitRules() implementation with a
this reference to the current standard.
public class BoundingAdjacencyRuleGross : AecBoundingAdjacencyRule
{
private AecSpaceOffsetStandardISA standard;
public BoundingAdjacencyRuleGross(AecSpaceOffsetStandardISA
standardISA)
{
standard = standardISA;
}
public override AecSpaceOffsetInfo Apply(ObjectId idSpace, Ob
jectId idObject, ObjectId idAdjSpace)
{
String classificationNameThis = "";
String classificationNameAdjacent = "";
if (!idSpace.IsNull)
{
classificationNameThis = standard.Classification.GetClassi
ficationName(idSpace);
}
if (!idAdjSpace.IsNull)
{
classificationNameAdjacent = standard.Classification.GetClas
sificationName(idAdjSpace);
}
if (idAdjSpace.IsNull || classificationNameAdjacent =="Exter
ior")
{
return new AecSpaceOffsetInfo(AecSpaceOffsetType.Opposite);
}
if (!idAdjSpace.IsNull && classificationNameThis == "Exterior")
{
return new AecSpaceOffsetInfo(AecSpaceOffsetType.Adjacent);
}
if (classificationNameThis == "Office")
{
return new AecSpaceOffsetInfo(AecSpaceOffsetType.Adjacent);
}
// for the rest
return new AecSpaceOffsetInfo(AecSpaceOffsetType.Center);
}
}
Implementing Offset Rules | 3211
Loading ...
Loading ...
Loading ...