autodesk aec base activex and vba reference guide · object in the autocad activex and vba...

Post on 24-Mar-2020

140 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ObjectsAec2dSectionAEC2Dsectionobject.

AecAnchorBaseclassforallAECanchorobjects.

AecAnchorEntToCurveBindsoneAECobjecttoanotherAECorAutoCADobject,suchasaroof,wall,line,orarc.

AecAnchorEntToGridAssemblyAttachesentityobjects,suchasdoorsandwindows,togridassemblies,suchascurtainwallsandwindowassemblies.

AecAnchorEntToLayoutCellAttachesobjects,suchaslightfixtures,tocellsona2Dlayoutgrid.

AecAnchorEntToLayoutNodeAttachesobjects,suchascolumns,tonodesonalayoutgrid.

AecAnchorEntToLayoutVolumeAttachesobjects,suchasfurniture,tovolumesona3Dlayoutgrid.

AecAnchorLeadEntToNodeConnectsanobjecttoalayoutnodewithaleaderbetweenthetwoobjects.

AecAnchorToRefBaseclassforreferencingobjectsfromananchor.

AecBaseApplicationApplicationobjectextendingAcadApplicationtoprovidesupportforAECApplications.

AecBaseDatabaseAECdatabaseobjectextendingAcadDatabasetoprovidesupportforgeneralAECobjects.

AecBaseDatabasePreferencesAderivativeofAecDatabasePreferences,providingbasedesktopdatabasepreferencessupport.

AecBaseDocumentAnAECdrawingobject,extendingtheAcadDocumenttoprovidesupportforgeneralAECobjects.

AecBaseDocumentsThecollectionofallAECdrawingsopeninthe

currentsession.

AecBasePreferencesAECAutoCADpreferencesobject.

AecBlockRefAninstanceofanAECblockinadrawing.

AecCameraAECcameraobject.

AecCellLayoutToolBaseClassforthelayoutgridobjects.

AecClipVolClipVolumeentitydefininganextrudedregionforclipping.

AecClipVolResClipVolumeResultwhichcapturestheresultinggraphicsforasectionorelevationforinsertionintothedrawing.

AecDatabaseAECDatabaseobjectextendingtheAcadDatabaseobject.

AecDatabasePreferencesExtendstheAutoCADDatabasePreferencesobjecttoincludeAECpropertiesandmethods.

AecDictionaryAECDictionarycontainingacollectionofAECobjects.

AecDictRecordAnAECDictionaryitem.

AecEditInPlaceProfileIn-placeeditprofileobject.

AecEntityBaseclassforallAECentities.

AecEntRefAreferencetoanyentityinthedrawing,similartoablockreference.

AecGeoProvideslocation,rotationandanchoringcapabilitiesforAECentities.

AecGridAssemblyBaseclassforgridassemblies.

AecLayerKeyLayerkeydefinition,whichspecifiesthelayerpropertiesgeneratedfromaparticularkey.

AecLayerKeysThecollectionoflayerkeydefinitionsinalayerkeystyle.

AecLayerKeyStyleAcollectionoflayerkeys.

AecLayerKeyStylesThecollectionoflayerkeystylesinthespecifieddrawing.

AecLayerOverrideSettingAlayerkeystyleoverridesetting.

AecLayerOverrideSettingsThecollectionofoverridesettingsinalayerkeystyle.

AecLayoutCurveAsingledimensionalgridwithnodesalongasinglecurve.

AecLayoutCurveNodeAnodeinalayoutcurve.

AecLayoutCurveNodesThecollectionofnodesinalayoutcurve.

AecLayoutGrid2DLayoutgridentityusedtolayoutanyAECobjectwithina2Dgrid.

AecLayoutGrid2DNodeAnodeina2Dlayoutgrid.

AecLayoutGrid2DNodesThecollectionofnodesina2Dlayoutgrid.

AecLayoutGrid2DXNodeAnodealongtheXaxisofa2Dlayoutgrid.

AecLayoutGrid2DXNodesCollectionofnodesalongtheXaxisofa2Dlayoutgrid.

AecLayoutGrid2DYNodeAnodealongtheYaxisofa2Dlayoutgrid.

AecLayoutGrid2DYNodesCollectionofnodesalongtheYaxisofa2Dlayoutgrid.

AecLayoutGrid3DAlayoutvolumeforarrangingobjectsina3Dgrid.

AecLayoutGrid3DNodeAnodeofa3DLayoutGrid.

AecLayoutGrid3DNodesThecollectionofnodesina3Dlayoutgrid.

AecLayoutGrid3DXNodeAnodealongtheXaxisofalayoutvolume.

AecLayoutGrid3DXNodesCollectionofnodesalongtheXaxisofalayoutvolume.

AecLayoutGrid3DYNodeAnodealongtheYaxisofalayoutvolume.

AecLayoutGrid3DYNodesCollectionofnodesalongtheYaxisofalayoutvolume.

AecLayoutGrid3DZNodeAnodealongtheZaxisofalayoutvolume.

AecLayoutGrid3DZNodesCollectionofnodesalongtheZaxisofalayoutvolume.

AecLayoutNodeProvidescommonpropertiessharedbyalltypesoflayoutnodes.

AecLayoutNodesCollectionoflayoutnodes.

AecLayoutToolProvidescommonfunctionalityforlayoutcurveandlayoutgridobjects.

AecMaskBlockRefAninstanceofamaskblock,atwo-dimensionalblockthatcoverspartofanAECobjectinaplan(2D)view.

AecMaskBlockStyleDefinesthepropertiesofamaskblockobject.

AecMaskBlockStylesThecollectionofmaskblockstylesinthespecifieddrawing.

AecMassElementAnobjectthathasbehaviorsbasedonitsshape.

AecMassElementStyleDefinesthepropertiesofamasselementobject.

AecMassElementStylesThecollectionofmasselementstylesinthespecifieddrawing.

AecMassGroupAgroupofmasselementscombinedtoformacomplexshape.

AecMassGroupsThecollectionofmassgroupsinthespecifieddrawing.

AecMVBlockRefAninstanceofablockthatcanhavedifferentrepresentationsindifferentviewdirections.

AecMVBlockStyleDefinesthepropertiesofamulti-viewblockobject.

AecMVBlockStylesThecollectionofmulti-viewblockstylesinthespecifieddrawing.

AecObjectProvidescommonfunctionalityforAECdatabaseobjects.

AecPolygonAnAecPolygonobject.

AecPolygonStyleDefinesthepropertiesofanAecPolygonobject.

AecPolygonStylesThecollectionofAecPolygonstylesinthespecifieddrawing.

AecProfileDefinesthepropertiesofaprofilestyle.

AecProfileStyleAcustomshapedefinedbytwo-dimensionalclosedpolylines.

AecProfileStylesThecollectionofprofilestylesinthespecifieddrawing.

AecRingAclosedloopofpolylinesegments,oftenusedasagroupinsideanAecProfileobject.

AecRingsThecollectionofringsinanAecProfileobject.

AecSliceSliceofamassinggrouporanyAECobject,typicallyusedtogeneratefloorplatesandspaceboundaries.

AecViewBlockViewblockusedfordisplayrepresentationsbyamulti-viewblock.

AecViewBlocksAcollectionofviewblocksusedfordisplayrepresentationsbyamulti-viewblock.

AecVolumeLayoutToolProvidesstandardfunctionalityforall3Dlayouttools.

AECBaseObjectModel

Clickonanobjecttoviewthedescription.

2DSectionObject

AEC2Dsectionobject.

VBAobjectname: Aec2dSection

Createusing: AddCustomObject("Aec2dSection")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

Properties

Application

ClipVol

Description

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Document

Handle

HasExtensionDictionary

Hyperlinks

LayerLinetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

AnchorObject

BaseclassforallAECanchorobjects.

VBAobjectname: AecAnchor

Createusing: NewAecAnchor

Accessvia: AecGeo.GetAnchor

YoucanuseAecAnchorasagenericreferencetoanchorobjects.

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

Properties

Application

Description

Document

Handle

HasExtensionDictionary

Events

Modified

GetXData

SetXDataObjectID

ObjectName

OwnerID

AnchorEntitytoCurveObject

BindsoneAECobjecttoanotherAECorAutoCADobject,suchasaroof,wall,line,orarc.

VBAobjectname: AecAnchorEntToCurve

Createusing: NewAecAnchorEntToCurve

Accessvia: AecGeo.GetAnchor

Properties

Application

Description

Document

FlipX

FlipY

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

FlipY

FlipZ

Handle

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Reference

XDistance

XPositionFrom

XPositionTo

XRotation

YDistance

YPositionFrom

YPositionTo

ZDistance

ZPositionFrom

ZPositionTo

ZRotation

Events

Modified

AecAnchorEntToEntObject

BindsoneAECobjecttoanother.

VBAobjectname: AecAnchorEntToEnt

Createusing: NewAecAnchorEntToEnt

Accessvia: AecGeo.GetAnchor

Methods

AttachEntity

Delete

GetExtensionDictionary

Properties

Application

Description

Document

Handle

HasExtensionDictionary

Events

Modified

GetXData

SetXData

ObjectID

ObjectName

OwnerID

Reference

AnchorEntitytoGridAssemblyObject

Attachesentityobjects,suchasdoorsandwindows,togridassemblies,suchascurtainwallsandwindowassemblies.

VBAobjectname: AecAnchorEntToGridAssembly

Createusing: N/A

Accessvia: AecGeo.GetAnchor

Properties

AdjustSizing

AllowVariation

Application

BottomOffset

Cell

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

Cell

Description

Document

FlipX

FlipY

FlipZ

Handle

HasExtensionDictionary

LeftOffset

ObjectID

ObjectName

OwnerID

Reference

RightOffset

TopOffset

YAlignment

YOffset

Events

Modified

AnchorEntitytoLayoutCellObject

Attachesobjectstocellsona2Dlayoutgrid.

VBAobjectname: AecAnchorEntToLayoutCell

Createusing: NewAecAnchorEntToLayoutCell

Accessvia: AecGeo.GetAnchor

Properties

Application

ApplyResize

CenterOnNode

Description

Document

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

FlipX

FlipY

FlipZ

Handle

HasExtensionDictionary

Node

ObjectID

ObjectName

Offset

OwnerID

Reference

ResizeOffset

UseNodeCS

XRotation

YRotation

ZRotation

Events

Modified

AnchorEntitytoLayoutNodeObject

Attachesobjects,suchascolumns,tonodesonalayoutgrid.

VBAobjectname: AecAnchorEntToLayoutNode

Createusing: NewAecAnchorEntToLayoutNode

Accessvia: AecGeo.GetAnchor

Properties

Application

CenterOnNode

Description

Document

FlipX

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

FlipY

FlipZ

Handle

HasExtensionDictionary

Node

ObjectID

ObjectName

Offset

OwnerID

Reference

UseNodeCS

XRotation

YRotation

ZRotation

Events

Modified

AnchorEntitytoLayoutVolumeObject

Attachesobjectstovolumesona3Dlayoutgrid.

VBAobjectname: AecAnchorEntToLayoutVolume

Createusing: NewAecAnchorEntToLayoutVolume

Accessvia: AecGeo.GetAnchor

Properties

Application

ApplyResize

CenterOnNode

Description

Document

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

FlipX

FlipY

FlipZ

Handle

HasExtensionDictionary

Node

ObjectID

ObjectName

Offset

OwnerID

Reference

ResizeOffset

UseNodeCS

XRotation

YRotation

ZRotation

Events

Modified

AecAnchorExtendedTagToEntObject

Attachesatagtoanobjecttodisplayscheduledata.

VBAobjectname: AecAnchorExtendedTagToEnt

Createusing: NewAecAnchorExtendedTagToEnt

Accessvia: AecGeo.GetAnchor

ThisobjectisavailableifthedrawingcontainsanyMVBlockstyles.

Methods

AttachEntity

Delete

Properties

Application

Description

Document

ForceHorizontal

Delete

GetExtensionDictionary

GetXData

SetXData

Handle

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Reference

AnchorLeaderEntitytoNodeObject

Connectsanobjecttoalayoutnodewithaleaderbetweenthetwoobjects.

VBAobjectname: AecAnchorLeadEntToNode

Createusing: NewAecAnchorLeadEntToNode

Accessvia: AecGeo.GetAnchor

Properties

AngleFromNode

Application

CenterOnNode

Description

Document

Methods

AttachEntity

Delete

GetExtensionDictionary

GetXData

SetXData

Document

FlipX

FlipY

FlipZ

Handle

HasExtensionDictionary

LeaderExtension1

LeaderExtension2

Node

ObjectID

ObjectName

Offset

OwnerID

Reference

UseNodeCS

XRotation

YRotation

ZRotation

Events

Modified

AnchortoReferenceObject

Baseclassforreferencingobjectsfromananchor.

VBAobjectname: AecAnchorToRef

Createusing: NewAecAnchorToRef

Accessvia: AecGeo.GetAnchor

Methods

AttachEntity

Delete

GetExtensionDictionary

Properties

Application

Description

Document

Handle

HasExtensionDictionary

Events

Modified

GetXData

SetXData

ObjectID

ObjectName

OwnerID

Reference

AecBaseApplicationObject

ApplicationobjectextendingAcadApplicationtoprovidesupportforAECApplications.

VBAobjectname: AecBaseApplication

Createusing:

ForVB:GetObject("Acad.Application")orCreateObject("Acad.Application")thenGetInterfaceObject("AecBase.Application")

ForVBA:notapplicable.Theapplicationisalwaysavailable.

Accessvia: ApplicationProperty

ThepropertiesassociatedwiththeAecBaseApplicationobjectreflectthepropertiesofthemainapplicationwindow.Themethodscontroltheloadingorlistingofthecurrentlyloadedexternalapplicationsandinterfaceobjects.

Theactivedocument(AutodeskArchitecturalDesktopdrawing)canbeaccessedusingtheActiveDocumentproperty.SeetheAcadApplicationobjectintheAutoCADActiveXandVBAReferenceforinformationregardingtheMethods,PropertiesandEventsprovidedthroughthisobject.

Methods

Eval

GetAcadState

GetInterfaceObject

Init

ListArx

LoadArx

LoadDVB

Quit

RunMacro

UnloadArx

UnloadDVB

Update

ZoomAll

ZoomCenter

ZoomExtents

ZoomPickWindow

Properties

ActiveDocument

Application

Caption

Documents

FullName

Height

LocaleId

MenuBar

MenuGroups

Name

Path

Preferences

StatusId

VBE

Version

Visible

ZoomPrevious

ZoomScaled

ZoomWindow

Width

WindowLeft

WindowState

WindowTop

AecBaseDatabaseObject

AECdatabaseobjectextendingAcadDatabasetoprovidesupportforgeneralAECobjects.

VBAobjectname: AecBaseDatabase

Createusing: N/A

Accessvia: ModelSpace.Item

Note:AllpropertiesandmethodsoftheAecBaseDatabaseobjectareavailablethroughtheAecBaseDocumentobject.

Properties

Blocks

Dictionaries

DimStyles

Methods

CopyObjects

HandleToObject

Init

ObjectIdToObject

DisplayConfigurations

DisplayRepresentations

DisplaySets

ElevationModelSpace

ElevationPaperSpace

Groups

LayerKeyStyles

Layers

Layouts

Limits

Linetypes

MaskBlockStyles

MassElementStyles

MassGroups

ModelSpace

MVBlockStyles

PaperSpace

PlotConfigurations

PolygonStyles

Preferences

ProfileStyles

RegisteredApplications

TextStyles

UserCoordinateSystems

Viewports

Views

AecBaseDatabasePreferencesObject

AderivativeofAecDatabasePreferences,providingbasedesktopdatabasepreferencessupport.

VBAobjectname: AecBaseDatabasePreferences

Createusing: N/A

Accessvia: AecBaseDatabase.PreferencesAecBaseDocument.Preferences

Properties

AllowLongSymbolNames

AlwaysImportLayerStandard

AngularAzimuth

AngularDisplayFormat

AngularPrecision

Methods

ConvertToCurrentAreaDisplay

AngularPrecision

Application

AreaDisplayUnit

AreaPrecision

AreaSuffixBasePoint

BasePointNE

BlockBasedLayerOffBehavior

ContourLinesPerSurface

CoordinatePrecision

CreateDimscaleOverride

Database

DatabaseScale

DisplaySilhouette

ElevationPrecision

FacetDeviation

FacetMaxiumum

LayerFile

LayerStandard

LinearDisplayFormat

LinearPrecision

ConvertToCurrentAreaDisplay

ConvertToCurrentVolumeDisplay

Init

SaveAsDefault

LinearUnit

Lineweight

LineWeightDisplay

MaxActiveViewports

MeasurementUnit

NorthRotation

ObjectSortByPlotting

ObjectSortByPSOutput

ObjectSortByRedraws

ObjectSortByRegens

ObjectSortBySelection

ObjectSortBySnap

OLELaunch

ProjectName

RenderSmoothness

ScaleOnInsert

SegmentPerPolyline

SolidFill

TextFrameDisplay

TextHeight

VerticalScale

VerticalScale

VolumeDisplayUnit

VolumePrecision

VolumeSuffix

XRefEdit

XRefLayerVisibility

XrefOverlaysUseOwnDisplayConfig

AecBaseDocumentObject

AnAECdrawingobject,extendingtheAcadDocumenttoprovidesupportforgeneralAECobjects.

Note:ThisobjectisactuallyacomponentoftheAecXUIBaseobjectmodel,whichrepresentsuserinterfaceobjects.

VBAobjectname: AecBaseDocument

Createusing:Documents.AddDocuments.OpenDocument.New

Accessvia: Documents.ItemApplication.ActiveDocument

ThePreferencespropertyprovidesaccesstodrawingsettings.

TheactivedocumentcanbeaccessedthroughtheActiveDocumentpropertyoftheAecBaseApplicationobject,afterinitializing

Methods

Activate

AuditInfo

Close

CopyObjects

EndUndoMark

Export

GetVariable

HandleToObject

Import

Init

LoadShapeFile

New

ObjectIdToObject

Open

PurgeAll

Regen

Save

DimStyles

DisplayConfigurations

DisplayRepresentations

DisplaySets

ElevationModelSpace

ElevationPaperSpace

FullName

Groups

Height

HWND

LayerKeyStyles

Layers

Layouts

Limits

Linetypes

MaskBlockStyles

MassElementStyles

MassGroups

ModelSpace

MSpace

SaveAs

SendCommand

SetVariable

StartUndoMark

Wblock

MVBlockStyles

Name

ObjectSnapMode

PaperSpace

Path

PickfirstSelectionSet

Plot

PlotConfigurations

PolygonStyles

Preferences

ProfileStyles

ReadOnly

RegisteredApplications

Saved

SelectionSets

TextStyles

UserCoordinateSystems

Utility

Viewports

Views

Width

WindowState

WindowTitle

AecBaseDocumentsCollection

ThecollectionofallAECdrawingsopeninthecurrentsession.

Note:ThisobjectisactuallyacomponentoftheAecXUIBaseobjectmodel,whichrepresentsuserinterfaceobjects.

VBAobjectname: AecBaseDocuments

Createusing: N/A

Accessvia: AecBaseApplication.Documents

Methods

Add

Close

Init

Item

Properties

Application

Count

Item

Open

AecBasePreferencesObject

AECAutoCADpreferencesobject.

VBAobjectname: AecBasePreferences

Createusing: N/A

Accessvia: AecBaseApplication.Preferences

TheAecBasePreferencesobjectholdsalltheoptionsstoredexternaltothedrawing,suchasUserPreferences.Theoptionsarestoredinseparateobjects,groupedbycategory.UsethepropertiesoftheAecBasePreferencesobjecttoaccesseachcategory.

OptionsthatresideinthedrawingcanbeaccessedthroughtheAecBaseDatabasePreferencesobject.

Currently,AecBasePreferencesdoesnotprovideaccesstoAEC-specificoptions;itisequivalenttoAcadPreferences.RefertoAcadPreferencesintheAutoCADActiveXandVBAReferenceforinformationaboutthis

object'smethodsandproperties.

Methods

Init

Properties

Application

Display

Drafting

Files

OpenSave

Output

Profiles

Selection

System

User

AECBlockObject

AninstanceofanAECblockinadrawing.

VBAobjectname: AecBlockRef

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

AecBlockRefisthebaseobjectfortheAecMVBlockRefandAecMaskBlockRefobjects.

Methods

ArrayPolar

ArrayRectangular

Properties

Application

Color

Description

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchorGetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Description

Document

Handle

HasExtensionDictionary

HyperlinksLayer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

ScaleX

ScaleY

ScaleZ

TrueColor

Visible

Events

Modified

CameraObject

AECcameraobject.

VBAobjectname: AecCamera

Createusing: AddCustomObject("AecCamera")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Properties

Application

Color

Description

Document

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionaryGetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Name

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Zoom

Events

Modified

CellLayoutToolObject

BaseClassforthelayoutgridobjects.

VBAobjectname: AecCellLayoutTool

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Thisisthebaseclassforallrectangularcelllayouttools,includingAecLayoutGrid2DandAecLayoutGrid3d.YoucanuseAecCellLayoutToolasagenericreferencetolayoutgridobjects.

Methods

ArrayPolarProperties

ArrayRectangular

AttachAnchor

ClosestNode

Copy

DeleteGetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Properties

Application

Color

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

Update

ClipVolumeObject

ClipVolumeentitydefininganextrudedregionforclipping.

VBAobjectname: AecClipVol

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

ThisisthebaseclassforADTbuildingelevationandsectionlineobjects.

Methods

ArrayPolar

Properties

Angle1

Angle2

Application

ArrayRectangular

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

Color

Description

Document

Handle

HasExtensionDictionary

Height

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

LowerExtension

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

Side1

Events

Modified

TransformBy

Update

Side2

TrueColor

UseModelExtents

Visible

ClipVolumeResultObject

ClipVolumeResultwhichcapturestheresultinggraphicsforasectionorelevationforinsertionintothedrawing.

VBAobjectname: AecClipVolRes

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

ThisisthebaseclassfortheADTsectionlineobject.

Methods

ArrayPolar

ArrayRectangular

Properties

Application

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Color

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

AecDatabaseObject

AECDatabaseobjectextendingtheAcadDatabaseobject.

VBAobjectname: AecDatabase

Createusing: N/A

Accessvia: ModelSpace.Item

Note:AccessallpropertiesandmethodsoftheAecDatabaseobjectthroughtheAecBaseDocumentobject.

Properties

Blocks

Dictionaries

DimStyles

ElevationModelSpace

ElevationPaperSpace

Methods

CopyObjects

HandleToObject

Init

ObjectIdToObject

ElevationPaperSpace

Groups

Layers

Layouts

Limits

Linetypes

ModelSpace

PaperSpace

PlotConfigurations

Preferences

RegisteredApplications

TextStyles

UserCoordinateSystems

Viewports

Views

AecDatabasePreferencesObject

ExtendstheAutoCADDatabasePreferencesobjecttoincludeAECpropertiesandmethods.

VBAobjectname: AecDatabasePreferences

Createusing: N/A

Accessvia: ModelSpace.Item

Note:UseAecBaseDatabasePreferencesinsteadofAecDatabasePreferences.

Properties

AllowLongSymbolNames

Application

ContourLinesPerSurface

Methods

Init

DisplaySilhouette

Lineweight

LineWeightDisplay

MaxActiveViewports

ObjectSortByPlotting

ObjectSortByPSOutput

ObjectSortByRedraws

ObjectSortByRegens

ObjectSortBySelection

ObjectSortBySnap

OLELaunch

RenderSmoothness

SegmentPerPolyline

SolidFill

TextFrameDisplay

XRefEdit

XRefLayerVisibility

AecDictionaryObject

AECDictionarycontainingacollectionofAECobjects.

VBAobjectname: AecDictionary

Createusing: N/A

Accessvia: N/A

AecDictionaryisthebaseclassforAECstylecollections,suchasAecLayerKeyStylesandAecMaskBlockStyles.ThesecollectionscanbeaccessedfromtheAecBaseDocumentobject.

Methods

Delete

GetExtensionDictionary

GetXData

Properties

Application

Count

Document

HandleEvents

Has

Remove

Rename

SetXData

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Modified

AecDictionaryRecordObject

AnAECDictionaryitem.

VBAobjectname: AecDictRecord

Createusing: N/A

Accessvia: N/A

ThisisthebaseclassforallAECStyleobjects,suchasAecLayerKeyStyleandAecMaskBlockStyle.

Methods

Delete

Properties

AlternateName

Application

Description

Document

Delete

GetExtensionDictionary

GetXData

SetXData

Document

Handle

HasExtensionDictionary

Name

ObjectID

ObjectName

OwnerID

Events

Modified

AecDisplayComponentObject

AnentityorhatchcomponentofatheAecDisplayComponentscollection.

VBAobjectname: AecDisplayComponent

Createusing: N/A

Accessvia: AecDisplayComponents.Item

AecDisplayComponentisabaseclass.ThederivedclassesareAecDisplayComponentEntityorAecDisplayComponentHatch.ChecktheobjecttypereturnedbytheAecDisplayComponents.Itemfortheunderlyingobject.

Methods

Properties

Index

Name Events

Owner

AecDisplayComponentEntityObject

Theentitypropertiesforthedisplaycomponent.

VBAobjectname: AecDisplayComponentEntity

Createusing: N/A

Accessvia: AecDisplayComponents.Item

AecDisplayComponentEntityisaderivedclass.AecDisplayComponentisthebaseclass.CheckthetypereturnedbytheAecDisplayComponents.Itemmethodfortheunderlyingobject.

Properties

AllowByMaterial

ByMaterial

Index

Methods

Layer

Linetype

Linetypescale

LineWeight

Name

Owner

PlotStyleName

TrueColor

Visible

Events

AecDisplayComponentHatchObject

Thehatchpropertiesforthedisplaycomponent.

VBAobjectname: AecDisplayComponentHatch

Createusing: N/A

Accessvia: AecDisplayComponents.Item

AecDisplayComponentHatchisaderivedclass.AecDisplayComponentisthebaseclass.CheckthetypereturnedbytheAecDisplayComponents.Itemmethodfortheunderlyingobject.

Properties

Angle

DoubleHatch

HatchType

Methods

Index

Name

Owner

PatternName

Scale

Spacing

UseAngleOfObject

XOffset

YOffset

Events

AecDisplayComponentsCollection

Thecollectionofdisplaycomponentsinadisplayrepresentation.

VBAobjectname: AecDisplayComponents

Createusing: N/A

Accessvia: AecDisplayProperties.DisplayComponents

ThedisplaycomponentscollectioncontainsAecDisplayComponentEntityandAecDisplayComponentHatchobjects.

Methods

Item

Properties

Count

Owner

Events

AecDisplayConfigurationObject

Adisplayconfiguration.

VBAobjectname: AecDisplayConfiguration

Createusing: N/A

Accessvia: AecDisplayConfiguration.Item

Methods

Properties

AlternameName

CutPlaneDisplayAbove

CutPlaneDisplayBelow

CutPlaneHeight

DisplaySet

Events

Modified

FixedViewDirection

Name

UseFixedViewDirection

AecDisplayConfigurationsObject

Acollectionofdisplayconfigurations.

VBAobjectname: AecDisplayConfigurations

Createusing: N/A

Accessvia: AecBaseDatabase.DisplayConfigurationsAecBaseDocument.DisplayConfigurations

Methods

Add

Has

Import

Item

Remove

Properties

ActiveConfiguration

Count

Events

Modified

Remove

Rename

AecDisplayPropertiesObject

Acollectonofdisplaypropertiesforadisplayrepresentation.

VBAobjectname: AecDisplayProperties

Createusing: N/A

Accessvia: AecDisplayRepresentation.DefaultDisplayPropertiesAecDisplayRepresentation.OverrideDisplayProperties

UsetheAecDisplayPropertiescollectiontoaccessthematerialproperties,entitycomponentpropertiesandhatchcomponentpropertiesofthedisplayrepresentation.

AecDisplayPropertiesisabaseclass.ThederivedclassisAecDisplayPropertiesMaterial.CheckthetypereturnedbytheDefaultDisplayPropertiesmethodandOverrideDisplayPropertiesmethodfortheunderlyingobject.

Properties

MethodsDisplayComponents Events

AecDisplayPropertiesMaterialObject

Thematerialdisplaypropertiesforadisplayrepresentation.

VBAobjectname: AecDisplayPropertiesMaterial

Createusing: N/A

Accessvia: AecDisplayRepresentation.DefaultDisplayPropertiesAecDisplayRepresentation.OverrideDisplayProperties

AecDisplayPropertiesMaterialisaderivedclass.AecDisplayPropertiesisthebaseclass.CheckthetypereturnedbytheDefaultDisplayPropertiesmethodandOverrideDisplayPropertiesmethodfortheunderlyingobject.

Properties

DisplayComponents

DisplayHiddenLinework

Methods

ExcludeFrom2dSectionShrinkwrap

SectionedBodyRenderingMaterialName

SectionRenderingMaterialName

SurfaceHatchPlacement

SurfaceRenderingMaterialName

SurfaceRenderMaterialMapping

MergeCommonMaterials

Events

AecDisplayRepresentationObject

Adisplayrepresentation.

VBAobjectname: AecDisplayRepresentation

Createusing: AecDisplayRepresentation.Duplicate

Accessvia: AecDisplayRepresentations.Item

Name

Methods

AddOverride

DeleteOverride

Duplicate

Properties

AlternameName

ClassName

DefaultDisplayProperties

DisplayName

Events

Modified

OverrideDisplayProperties

AecDisplayRepresentationsObject

Thecollectionofdisplayrepresentations.

VBAobjectname: AecDisplayRepresentations

Createusing: N/A

Accessvia:AecDisplaySet.DisplayRepresentationsAecBaseDatabase.DisplayRepresentationsAecBaseDocument.DisplayRepresentations

Methods

Append

Has

Item

Remove

Properties

Count

Owner

Events

Edit-In-PlaceProfileObject

In-placeeditprofileobject.

VBAobjectname: AecEditInPlaceProfile

Createusing: AddCustomObject("AecEditInPlaceProfile")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Properties

Application

Description

Document

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Handle

HasExtensionDictionary

Hyperlinks

InsertionPoint

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Profile

ProfileStyleName

Rotation

TrueColor

Visible

Events

Modified

AecEntityObject

BaseclassforallAECentities.

VBAobjectname: AecEntity

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

AlthoughAecEntitycanbeusedasagenericreferencetoanyAECobject,itisbettertouseAecGeoasagenericAECobjectreference.AecGeoisthegreatestcommondominatorforallAECobjects.

Methods

ArrayPolar

ArrayRectangular

Properties

Application

Color

Copy

Delete

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Color

Description

Document

Handle

HasExtensionDictionaryHyperlinks

Layer

Linetype

LinetypeScale

Lineweight

ObjectID

ObjectName

OwnerID

PlotStyleName

TrueColor

Visible

Events

Modified

AecEntityReferenceObject

Areferencetoanyentityinthedrawing,similartoablockreference.

VBAobjectname: AecEntRef

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

Properties

Application

Color

Description

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

Offset

OwnerID

PlotStyleName

Rotation

ScaleX

ScaleY

ScaleZ

TrueColor

Events

Modified

UseOffset

Visible

AecGeoObject

Provideslocation,rotationandanchoringcapabilitiesforAECentities.

VBAobjectname: AecGeo

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

UseAecGeoasagenericreferencetoAECobjects.

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Properties

Application

Color

Description

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Description

Document

Handle

HasExtensionDictionary

HyperlinksLayer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

GridAssemblyObject

Baseclassforgridassemblies.

VBAobjectname: AecGridAssembly

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

YoucanuseAecGridAssemblyasagenericreferencetogrids,butnopropertiesormethodsspecifictogridsarecurrentlyexposedthroughthisobject.

Methods

ArrayPolarProperties

ArrayRectangular

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

Properties

Application

Color

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

TransformBy

Update

LayerKeyObject

Layerkeydefinition,whichspecifiesthelayerpropertiesgeneratedfromaparticularkey.

VBAobjectname: AecLayerKey

Createusing: AecLayerKeys.Add

Accessvia: AecLayerKeys.Item

Methods

Properties

Color

Description

Index

Layer

LayerKeyStyle

Linetype

None Linetype

LineWeight

Name

PlotStyleName

PlottableRemoveable

LayerKeysCollectionObject

Thecollectionoflayerkeydefinitionsinalayerkeystyle.

VBAobjectname: AecLayerKeys

Createusing: N/A

Accessvia: AecLayerKeyStyle.Keys

Methods

Add

Item

Remove

Properties

Count

LayerKeyStyle

LayerKeyStyleObject

Acollectionoflayerkeys.

VBAobjectname: AecLayerKeyStyle

Createusing: N/A

Accessvia: AecLayerKeyStyles.Item

Methods

Delete

ExpandKey

Properties

AlternateName

Application

Description

Document

Handle

ExpandKey

GenerateLayer

GetExtensionDictionary

GetXData

SetXData

HasExtensionDictionary

Keys

Name

ObjectID

ObjectName

OverridesEnabled

OverrideSettings

OwnerID

Events

Modified

LayerKeyStylesCollection

Thecollectionoflayerkeystylesinthespecifieddrawing.

VBAobjectname: AecLayerKeyStyles

Createusing: N/A

Accessvia: AecBaseDatabase.LayerKeyStyles

Methods

Add

Delete

GetExtensionDictionary

GetXData

Has

Properties

Application

Count

Document

Handle

HasExtensionDictionary

Events

Modified

Item

Remove

SetXData

ObjectID

ObjectName

OwnerID

LayerKeyOverrideSettingObject

Alayerkeystyleoverridesetting.

VBAobjectname: AecLayerOverrideSetting

Createusing: N/A

Accessvia: AecLayerOverrideSettings.Item

Methods

None

Properties

Index

LayerKeyStyle

Name

Value

LayerKeyStyleOverrideSettingsCollection

Thecollectionofoverridesettingsinalayerkeystyle.

VBAobjectname: AecLayerOverrideSettings

Createusing: N/A

Accessvia: AecLayerKeyStyle.OverrideSettings

Methods

Item

Properties

Count

LayerKeyStyle

LayoutCurveObject

Asingledimensionalgridwithnodesalongasinglecurve.

VBAobjectname: AecLayoutCurve

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

YoucannotcreateanewlayoutcurvethroughActiveX,andmanypropertiesofthisobjectarenotyetexposed.

Methods

Properties

Application

Color

ArrayPolar

ArrayRectangular

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

Count

Description

Document

EndOffset

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Nodes

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

Spacing

Events

Modified

SetXData

TransformBy

Update

StartOffset

TrueColor

Type

Value

Visible

LayoutCurveNodeObject

Anodeinalayoutcurve.

VBAobjectname: AecLayoutCurveNode

Createusing: N/A

Accessvia: AecLayoutCurveNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutCurve

Spacing

LayoutCurveNodesCollection

Thecollectionofnodesinalayoutcurve.

VBAobjectname: AecLayoutCurveNodes

Createusing: N/A

Accessvia: AecLayoutCurve.Nodes

Youcanaccessthemembersofthecollection,buttheycurrentlycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutCurve

Events

None

LayoutGrid2DObject

LayoutgridentityusedtolayoutanyAECobjectwithina2Dgrid.

VBAobjectname: AecLayoutGrid2D

Createusing: AddCustomObject("AecLayoutGrid2D")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Properties

Angle

Application

BayAngle

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

ClosestNode

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

Boundary

Color

Depth

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

InsideRadius

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

Events

Modified

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Shape

TrueColor

Visible

Width

XCount

XEndOffset

XNodes

XSpacing

XStartOffset

XType

YCount

YEndOffset

YNodes

YSpacing

YStartOffset

YType

ZCount

ZSpacing

LayoutGrid2DNodeObject

Anodeina2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DNode

Createusing: N/A

Accessvia: AecLayoutGrid2DNodes.Item(Butseenotebelow.)

Thisobjectisnotcurrentlyaccessible.Youcanaccess2DnodeobjectsthroughAecLayoutGrid2DXNodeandAecLayoutGrid2DYNode,butmostoftheirpropertiesarenotexposed.

Methods

None

Properties

Index

LayoutGrid2D

Spacing

Events

None

Spacing

LayoutGrid2DNodesCollection

Thecollectionofnodesina2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DNodes

Createusing: N/A

Accessvia: N/A

Thiscollectionisnotaccessible.UseAecLayoutGrid2DXNodesandAecLayoutGrid2DYNodesinstead.

Methods

Item

Properties

Count

LayoutGrid2D

Events

None

LayoutGrid2DXNodeObject

AnodealongtheXaxisofa2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DXNode

Createusing: N/A

Accessvia: AecLayoutGrid2DXNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutGrid2D

Spacing

Events

None

LayoutGrid2DXNodesCollection

CollectionofnodesalongtheXaxisofa2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DXNodes

Createusing: N/A

Accessvia: AecLayoutGrid2D.XNodes

Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutGrid2D

Events

None

LayoutGrid2DYNodeObject

AnodealongtheYaxisofa2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DYNode

Createusing: N/A

Accessvia: AecLayoutGrid2DYNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutGrid2D

Spacing

Events

None

LayoutGrid2DYNodesCollection

CollectionofnodesalongtheYaxisofa2Dlayoutgrid.

VBAobjectname: AecLayoutGrid2DYNodes

Createusing: N/A

Accessvia: AecLayoutGrid2D.YNodes

Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutGrid2D

Events

None

LayoutGrid3DObject

Alayoutvolumeforarrangingobjectsina3Dgrid.

VBAobjectname: AecLayoutGrid3D

Createusing: AddCustomObject("AecLayoutGrid3D")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Properties

Application

Color

Depth

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

Description

Document

Handle

HasExtensionDictionary

Height

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Width

Events

Modified

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

XCount

XEndOffset

XNodes

XSpacing

XStartOffset

XType

YCount

YEndOffset

YNodes

YSpacing

YStartOffset

YType

ZCount

ZEndOffset

ZNodes

ZSpacing

ZStartOffset

ZType

LayoutGrid3DNodeObject

Anodeofa3DLayoutGrid.

VBAobjectname: AecLayoutGrid3DNode

Createusing: N/A

Accessvia: AecLayoutGrid3DNodes.Item(Butseenotebelow.)

Thisobjectisnotcurrentlyaccessible.Youcanaccess3DnodeobjectsthroughAecLayoutGrid3DXNodeandAecLayoutGrid3DYNode,butmostoftheirpropertiesarenotexposed.

Methods

None

Properties

Index

LayoutGrid3D

Spacing

Events

None

Spacing

LayoutGrid3DNodesCollection

Thecollectionofnodesina3Dlayoutgrid.

VBAobjectname: AecLayoutGrid3DNodes

Createusing: N/A

Accessvia: N/A

Thiscollectionisnotaccessible.UseAecLayoutGrid3DXNodesandAecLayoutGrid3DYNodesinstead.

Methods

Item

Properties

Count

LayoutGrid3D

Events

None

LayoutGrid3DXNodeObject

AnodealongtheXaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DXNode

Createusing: N/A

Accessvia: AecLayoutGrid3DXNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutGrid3D

Spacing

Events

None

LayoutGrid3DXNodesCollection

CollectionofnodesalongtheXaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DXNodes

Createusing: N/A

Accessvia: AecLayoutGrid3D.XNodes

Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutGrid3D

LayoutGrid3DYNodeObject

AnodealongtheYaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DYNode

Createusing: N/A

Accessvia: AecLayoutGrid3DYNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutGrid3D

Spacing

Events

None

LayoutGrid3DYNodesCollection

CollectionofnodesalongtheYaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DYNodes

Createusing: N/A

Accessvia: AecLayoutGrid3D.YNodes

Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutGrid3D

LayoutGrid3DZNodeObject

AnodealongtheZaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DZNode

Createusing: N/A

Accessvia: AecLayoutGrid3DZNodes.Item

MostnodepropertieshavenotbeenexposedthroughActiveX.

Methods

None

Properties

Index

LayoutGrid3D

Spacing

LayoutGrid3DZNodesCollection

CollectionofnodesalongtheZaxisofalayoutvolume.

VBAobjectname: AecLayoutGrid3DZNodes

Createusing: N/A

Accessvia: AecLayoutGrid3D.ZNodes

Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.

Methods

Item

Properties

Count

LayoutGrid3D

LayoutNodeObject

Providescommonpropertiessharedbyalltypesoflayoutnodes.

VBAobjectname: AecLayoutNode

Createusing: N/A

Accessvia: AecLayoutNodes.Item

Methods

None

Properties

SpacingEvents

None

LayoutNodesCollection

Collectionoflayoutnodes.

VBAobjectname: AecLayoutNodes

Createusing: N/A

Accessvia: AecLayoutCurve.Nodes

Methods

Item

Properties

Count

LayoutToolObject

Providescommonfunctionalityforlayoutcurveandlayoutgridobjects.

VBAobjectname: AecLayoutTool

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

AecLayoutToolcanbeusedasagenericreferencetolayoutobjects.

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Properties

Application

Color

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Color

Description

Document

Handle

HasExtensionDictionaryHyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

MaskBlockObject

Aninstanceofamaskblock,atwo-dimensionalblockthatcoverspartofanAECobjectinaplan(2D)view.

VBAobjectname: AecMaskBlockRef

Createusing: Modelspace.AddCustomObject("AecMaskBlockRef")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

Properties

Application

Color

CutProfile

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

ScaleX

ScaleY

ScaleZ

Style

Events

Modified

StyleName

TrueColor

Visible

MaskBlockStyleObject

Definesthepropertiesofamaskblockobject.

VBAobjectname: AecMaskBlockStyle

Createusing: AecMaskBlockStyles.Add("Name")

Accessvia: AecMaskBlockStyles.Item

MostmaskblockstylepropertiesarenotyetexposedthroughActiveX.

Methods

Delete

Properties

AlternateName

Application

Description

DocumentEvents

GetExtensionDictionary

GetXData

SetXData

Handle

HasExtensionDictionary

Name

ObjectID

ObjectNameOwnerID

Events

Modified

MaskBlockStylesCollection

Thecollectionofmaskblockstylesinthespecifieddrawing.

VBAobjectname: AecMaskBlockStyles

Createusing: N/A

Accessvia: AecBaseDatabase.MaskBlocks

Useofthiscollectionismostlylimitedtolistingthenameanddescriptionofthestyles.

Methods

Add

Delete

GetExtensionDictionary

GetXData

Properties

Application

Count

Document

HandleEvents

GetXData

Has

Item

Remove

SetXData

Handle

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Modified

MassElementObject

Anobjectthathasbehaviorsbasedonitsshape.

VBAobjectname: AecMassElement

Createusing: AddCustomObject("AecMassElement")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Properties

Application

Color

Depth

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

Delete

ExportFreeForm

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

ImportFreeForm

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Description

Deviation

Document

Handle

HasExtensionDictionary

Height

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

MassGroup

MassGroupName

Normal

ObjectID

ObjectName

Operation

OwnerID

PlotStyleName

Events

Modified

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Profile

ProfileStyle

ProfileStyleName

Radius

Rise

Rotation

Style

StyleName

Subtype

TrueColor

Type

Visible

Volume

Width

MassElementStyleObject

Definesthepropertiesofamasselementobject.

VBAobjectname: AecMassElementStyle

Createusing: AecMassElementStyles.Add("Name")

Accessvia: AecMassElementStyles.Item

Methods

Delete

GetExtensionDictionary

Properties

AlternateName

Application

Description

Document

HandleEvents

Modified

GetXData

SetXData

HasExtensionDictionary

Name

ObjectID

ObjectName

OwnerID

Modified

MassElementStylesCollection

Thecollectionofmasselementstylesinthespecifieddrawing.

VBAobjectname: AecMassElementStyles

Createusing: N/A

Accessvia: AecBaseDatabase.MassElementStyles

Methods

Add

Delete

GetExtensionDictionary

GetXData

Has

Properties

Application

Count

Document

Handle

HasExtensionDictionary

Events

Modified

Item

Remove

Rename

SetXData

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

MassGroupObject

Agroupofmasselementscombinedtoformacomplexshape.

VBAobjectname: AecMassGroup

Createusing: AecMassGroups.Add

Accessvia: AecMassGroups.Item

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

Properties

Application

Color

Description

Document

Handle

HasExtensionDictionary

Delete

ExportFreeForm

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

MassGroup

MassGroupName

Name

Normal

ObjectID

ObjectName

Operation

OwnerID

PlotStyleName

Rotation

SupportsAnchoring

TrueColor

Visible

Volume

Events

Modified

MassGroupsCollection

Thecollectionofmassgroupsinthespecifieddrawing.

VBAobjectname: AecMassGroups

Createusing: N/A

Accessvia: AecBaseDatabase.MassGroups

Methods

Item

Properties

Count

Database

AecMVBlockDisplayRepDefObject

Adisplayrepresentationdefinitionforamulti-viewblockstyle.

VBAobjectname: AecMVBlockDisplayRepDef

Createusing: N/A

Accessvia: AecMVBlockDisplayRepDefs.Item

Methods

Properties

DisplayName

Index

Owner

ViewBlockDefs

Events

AecMVBlockDisplayRepDefsCollection

Thecollectionofdisplayrepresentationdefinitionsforamulti-viewblockstyle.

VBAobjectname: AecMVBlockDisplayRepDefs

Createusing: N/A

Accessvia: AecMVBlockStyle.DisplayRepDefs

Methods

Item

Properties

Count

Owner

Events

Multi-ViewBlockObject

Aninstanceofablockthatcanhavedifferentrepresentationsindifferentviewdirections.

VBAobjectname: AecMVBlockRef

Createusing: AddCustomObject("AecMVBlockRef")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

Properties

Application

Color

Description

ArrayPolar

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

ScaleX

ScaleY

ScaleZ

Style

StyleName

Events

Modified

Update TrueColor

ViewBlocks

Visible

Multi-ViewBlockStyleObject

Definesthepropertiesofamulti-viewblockobject.

VBAobjectname: AecMVBlockStyle

Createusing: AecMVBlockStyles.Add("Name")

Accessvia: AecMVBlockStyles.Item

Mostmulti-viewblockstylepropertiesarenotyetexposedthroughActiveX.

Methods

Properties

AlternateName

Application

Description

DisplayRepDefs

Methods

Delete

GetExtensionDictionary

GetXData

SetXData

DisplayRepDefs

Document

Handle

HasExtensionDictionary

InterferenceBlockName

Name

ObjectID

ObjectName

OwnerID

Events

Modified

Multi-ViewBlockStylesCollection

Thecollectionofmulti-viewblockstylesinthespecifieddrawing.

VBAobjectname: AecMVBlockStyles

Createusing: N/A

Accessvia: AecBaseDatabase.MVBlockStyles

Useofthiscollectionismostlylimitedtolistingthenameanddescriptionofthestyles.

Methods

Add

Delete

GetExtensionDictionary

GetXData

Properties

Application

Count

Document

HandleEvents

GetXData

Has

Item

Remove

SetXData

Handle

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Modified

AecObjectObject

ProvidescommonfunctionalityforAECdatabaseobjects.

VBAobjectname: AecObject

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

AlthoughAecObjectcanbeusedasagenericreferencetoAECobjects,itisbettertouseAecGeoasagenericreference.AecGeoisthegreatestcommondominatorforallAECobjects.

Methods

Properties

Application

Description

Methods

Delete

GetExtensionDictionary

GetXData

SetXData

Description

Document

Handle

HasExtensionDictionary

ObjectID

ObjectName

OwnerID

Events

Modified

AECPolygonObject

AnAecPolygonobject.

VBAobjectname: AecPolygon

Createusing: Modelspace.AddCustomObject("AecPolygon")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

YoucanmodifyexistingAECPolygonobjects.AlthoughyoucancreateAECPolygons,youcannotcontrolthenumberorlengthofitssides,soit'snotveryuseful.

Methods

ArrayPolar

Properties

Application

Color

ArrayRectangular

AttachAnchor

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Profile

Rotation

Style

StyleName

TrueColor

Events

Modified

Visible

AECPolygonStyleObject

DefinesthepropertiesofanAecPolygonobject.

VBAobjectname: AecPolygonStyle

Createusing: AecPolygonStyles.Add("Name")

Accessvia: AecPolygonStyles.Item

Methods

Delete

Properties

AlternateName

Application

Description

Document

EdgeWidthEvents

GetExtensionDictionary

GetXData

SetXData

EdgeWidthJustify

Handle

HasExtensionDictionary

Name

ObjectID

ObjectName

OwnerID

Events

Modified

AECPolygonStylesCollection

ThecollectionofAecPolygonstylesinthespecifieddrawing.

VBAobjectname: AecPolygonStyles

Createusing: N/A

Accessvia: AecBaseDatabase.PolygonStyles

Methods

Add

Delete

GetExtensionDictionary

GetXData

Has

Properties

Application

Count

Document

Handle

HasExtensionDictionary

Events

Modified

Item

Remove

SetXData

ObjectID

ObjectName

OwnerID

ProfileObject

Definesthepropertiesofaprofilestyle.

VBAobjectname: AecProfile

Createusing: NewAecProfile

Accessvia: AecProfileStyle.Profile

Methods

Add

Clear

CopyFrom

Intersect

ScaleXY

Properties

Area

Bounds

Centroid

Coordinates

Rings

Perimeter

Subtract SelfIntersects

Valid

ProfileStyleObject

Acustomshapedefinedbytwo-dimensionalclosedpolylines.

VBAobjectname: AecProfileStyle

Createusing: AecProfileStyles.Add("Name")

Accessvia: AecProfileStyles.Item

Note:Profilesareinsertedintodrawingsaspolylines,notasAECobjects.

Methods

Delete

Properties

AlternateName

Application

Description

Document

Handle

GetExtensionDictionary

GetXData

SetXData

Handle

HasExtensionDictionary

Name

ObjectID

ObjectName

OwnerID

Profile

Events

Modified

ProfileStylesCollection

Thecollectionofprofilestylesinthespecifieddrawing.

VBAobjectname: AecProfileStyles

Createusing: N/A

Accessvia: AecBaseDatabase.ProfileStyles

Methods

Add

Delete

GetExtensionDictionary

GetXData

Has

Properties

Application

Count

Document

Handle

HasExtensionDictionary

Events

Modified

Item

Remove

SetXData

ObjectID

ObjectName

OwnerID

AecRingObject

Aclosedloopofpolylinesegments,oftenusedasagroupinsideanAecProfileobject.

VBAobjectname: AecRing

Createusing: AecRings.Add

Accessvia: AecRings.Item

Methods

Clear

Contains

CopyFrom

FromPoints

FromPolyline

Properties

Coordinates

Index

Profile

Valid

Void

AecRingsCollection

ThecollectionofringsinanAecProfileobject.

VBAobjectname: AecRings

Createusing: N/A

Accessvia: AecProfile.Rings

Methods

Add

Item

Remove

Properties

Count

Profile

SliceObject

SliceofamassinggrouporanyAECobject,typicallyusedtogeneratefloorplatesandspaceboundaries.

VBAobjectname: AecSlice

Createusing: AddCustomObject("AecSlice")

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

Methods

ArrayPolar

ArrayRectangular

AttachAnchor

Properties

Application

Area

Color

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Update

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlaneDepth

PlaneWidth

PlotStyleName

Profile

Rotation

TrueColor

Events

Modified

Visible

AecViewBlockObject

Viewblockusedfordisplayrepresentationsbyamulti-viewblock.

VBAobjectname: AecViewBlock

Createusing: N/A

Accessvia: AecViewBlocks.Item

Methods

None

Properties

Index

MVBlockRef

Name

XOffset

YOffset

Events

None

ZOffset

AecViewBlocksCollection

Acollectionofviewblocksusedfordisplayrepresentationsbyamulti-viewblock.

VBAobjectname: AecViewBlocks

Createusing: N/A

Accessvia: AecMVBlockRef.ViewBlocks

Youcannotaddnewviewblocks.

Methods

Item

Properties

Count

MVBlockRef

AecViewBlockDefObject

Aviewblockdefinitionforamulti-viewblockdisplayrepresentationdefinition.

VBAobjectname: AecViewBlockDef

Createusing: N/A

Accessvia: AecViewBlockDefs.Item

Methods

Properties

Block

Index

Owner

ViewDirection

Events

AecViewBlockDefsCollection

Thecollectionofviewblockdefinitionsforamulti-viewblockdisplayrepresentationdefinition.

VBAobjectname: AecViewBlockDefs

Createusing: N/A

Accessvia: AecMVBlockDisplayRepDef.ViewBlockDefs

Methods

Add

Item

Remove

Properties

Count

Owner

Events

VolumeLayoutToolObject

Providesstandardfunctionalityforall3Dlayouttools.

VBAobjectname: AecVolumeLayoutTool

Createusing: N/A

Accessvia:

ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item

AecVolumeLayoutToolcanbeusedasagenericreferenceto3Dlayout(volume)gridobjects,butyouwouldnormallyuseAecLayoutGrid3D.

Methods

ArrayPolar

ArrayRectangularProperties

ArrayRectangular

AttachAnchor

ClosestNode

Copy

Delete

GetAnchor

GetBoundingBox

GetExtensionDictionary

GetXData

Highlight

IntersectWith

Mirror

Mirror3D

Move

NodeLocation

ReleaseAnchor

Rotate

Rotate3D

ScaleEntity

SetXData

TransformBy

Application

Color

Description

Document

Handle

HasExtensionDictionary

Hyperlinks

Layer

Linetype

LinetypeScale

Lineweight

Location

Normal

ObjectID

ObjectName

OwnerID

PlotStyleName

Rotation

TrueColor

Visible

Events

Modified

Update

AllDrawingObjects

AlloftheseobjectscanbedefinedasanAcadEntityobject.AecAnchorEntToGridAssembly AecAnchor AecAnchorEntToCurve

AecAnchorEntToLayoutCell AecAnchorEntToLayoutNode

AecAnchorEntToLayoutVolume

AecAnchorLeadEntToNode AecAnchorToRef AecBlockRefAecCamera AecCellLayoutTool AecClipVolAecClipVolRes AecDictionary AecDictRecordAecEntity AecEntRef AecGeoAecGridAssembly AecLayoutGrid2D AecLayoutGrid3DAecLayerKeyStyle AecLayerKeyStyles AecLayoutToolAecMaskBlockRef AecMaskBlockStyle AecMaskBlockStylesAecMassElement AecMassGroup AecMVBlockStyleAecMVBlockStyles AecObject AecPolygonAecPolygonStyle AecPolygonStyles AecProfileStyleAecProfileStyles AecSlice AecVolumeLayoutTool

Methods

image image image image image image image image image image image image image image image image image image image image image image image image image image

A

AddAddsanobjecttoacollection,oraddstwoAecProfileobjects.

ArrayPolarCreatesapolararrayofobjectsgivenaNumberOfObjects,AngleToFill,andCenterPoint.

ArrayRectangularCreatesa2Dor3Drectangulararrayofobjects.

AttachAnchorAttachesananchortoanAECEntity

AttachEntityAnchorsoneAecGeoobjecttoanother.

B

C

ClearClearsAecRingsandAecProfilesofsegmentsorrings.

ClosestNodeReturnstheindexofthenodeclosesttoagivenpoint.

ContainsTeststoseeifaringisinsideanotherring.

ConvertToCurrentAreaDisplayConvertsanareavalueusingtheLinearUnitandAreaDisplayUnitsettings.

ConvertToCurrentVolumeDisplayConvertsavolumevalueusingtheLinearUnitandVolumeDisplayUnitsettings.

CopyDuplicatesthegivenobjecttothesamelocation.

CopyFromCopiesAecRingsandAecProfiles.

CopyObjectsDuplicatesmultipleobjects(deepcloning).

D

DeleteDeletesthespecifiedobject.

E

ExpandKeyCalculatesandreturnstheLayerNamethatwouldbegeneratedgiventhesupplied'Key'.

ExportFreeFormExportsaFreeFormrepresentationtoafile.

F

FromPointsMakesaringfrom2DPoints.

FromPolylineMakesaringfroma2DPolyline.

G

GenerateLayerGeneratethelayerrecord,givenaLayerKey.

GetAnchorReturnstheanchorattachedtoanobject.

GetBoundingBoxGetstwopointsofaboxenclosingthespecifiedobject.

GetExtensionDictionaryGetstheextensiondictionaryassociatedwithanobject.

GetXdataGetstheextendeddata(XData)associatedwithanobject.

H

HandleToObjectGetstheobjectthatcorrespondstothegivenhandle.

HasDeterminesifanobjectisamemberofthespecifiedcollection.

HighlightSetsthehighlightstatusforthegivenobject,orforallobjectsinagivenselectionset.

I

ImportFreeFormImportsaFreeFormrepresentationfromafile.

InitInitializationfunctionwhichmustbecalledbeforetheAECdatabaseobjectcanbeaccessed

IntersectBooleanIntersectsanAecProfilewiththecurrentAecProfile.

IntersectWithGetsthepointswhereoneobjectintersectsanotherobjectinthedrawing.

ItemReturnsamemberobjectofacollection.

J

K

L

M

MirrorCreatesamirrorimagecopyofaplanarobjectaroundanaxis.

Mirror3dCreatesamirrorimageofthegivenobjectaboutaplane.

MoveMovesanobjectalongavector.

N

NodeLocationReturnsthelocationofthenodeatagivenindex.

O

ObjectIDToObjectGetstheobjectthatcorrespondstothegivenobjectID.

P

Q

R

ReleaseAnchorRemovesananchorfromanobject.

RemoveRemovesanitemfromacollection.

RenameRenamesaniteminanAecDictionary.

RotateRotatesanobjectaroundabasepoint.

Rotate3dRotatesanobjectarounda3Daxis.Point1andPoint2definethelinethatbecomestheaxisofrotation.

S

SaveAsDefaultSavestheDatabasePreferencestotheregistry.

ScaleEntityScalesanobjectequallyinthe

ScaleXYScalesaprofileintheXandYdirections.

SetXdataSetstheextendeddata(XData)associatedwithanobject.

SubtractSubtractsanAecProfilefromthecurrentAecProfile.

T

TransformByMoves,scales,orrotatesanobjectgivena4x4transformationmatrix.

U

UpdateUpdatestheobjectinthedrawingwindow.

V

W

X

Y

Z

AddMethodAddsanobjecttoacollection,oraddstwoAecProfileobjects.

SeeAlso|Example

Signatures:Overview

LayerKeys,LayerKeyStyles,MaskBlockStyles,MassElementStyles,Multi-viewBlockStyles,PolygonStyles,ProfileStyles,DisplayConfigurations,DisplaySets

RetVal=collection.Add(Name)

Profilesobject.Add(profile)

RingsRetVal=collection.Add()

ViewBlockDefsRetVal=collection.Add(AcadBlock)

Signatures:Detail

RetVal=collection.Add(Name)

collectionAecLayerKeys,AecLayerKeyStyles,AecMassElementStyles,AecMaskBlockStyles,AecMVBlockStyles,AecPolygonStyles,AecProfileStyles,AecDisplayConfigurations,AecDisplaySets,AecViewBlockDefsThecollectiontheobjectisbeingaddedto.

NameString;input-onlyNameoftheobjecttobeaddedtothecollection.

RetValAecLayerKey,AecLayerKeyStyle,AecMaskBlockStyle,AecMassElementStyle,AecMVBlockStyle,AecPolygonStyle,AecProfileStyle,AecDisplayConfigurations,AecDisplaySets,AecViewBlockDefsThenewlyaddedobject.

object.Add(profile)

objectAecProfileTheprofileyouareaddinganewprofileobjectto.

profileAecProfile;input-onlyAecProfiletoaddtothefirstAecProfile

RetVal=collection.Add()

collectionAecRingsThecollectionyouareaddinganewringdefinitionto.

RetValAecRingThenewlyaddedobject.

RetVal=collection.Add(AcadBlock)

collectionAecViewBlockDefsThecollectionyouareaddinganewblockto.

AcadBlockAcadBlockobject;input-onlyTheblocktoaddtothecollection.

RetValAecViewBlockDefThenewlycreatedviewblockdefinitionobject.

AppendMethodAppendsanexistingdisplayrepresentationtothecollection.

SeeAlso|Example

Signature

object.AppendDisplayRepresentation

ObjectAecDisplayRepresentationsTheobjectorobjectsthismethodappliesto.

DisplayRepresentationAecDisplayRepresentation;input-onlyThedisplayrepresentationtoaddtothecollection.

Remarks

Thismethodappliestoadisplayrepresentationscollectioninadisplayset.

ArrayPolarMethodCreatesapolararrayofobjectsgivenaNumberOfObjects,AngleToFill,andCenterPoint.

SeeAlso|Example

Signature

RetVal=object.ArrayPolar(NumberOfObjects,AngleToFill,CenterPoint)

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

NumberOfObjectsInteger;input-onlyThenumberofobjectstobecreatedinthepolararray.Thismustbeapositiveintegergreaterthan1.

AngleToFillDouble;input-onlyTheangletofillinradians.Apositivevaluespecifiescounterclockwiserotation.Anegativevaluespecifiesclockwiserotation.Anerrorisreturnedforananglethatequals0.

CenterPointVariant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthecenterpointforthepolararray.

RetValVariantArray(arrayofobjects)Thearrayofnewobjects.

Remarks

AutoCADdeterminesthedistancefromthearray'scenterpointtoareferencepointonthelastobjectselected.Thereferencepointuseddependsonthetypeofobjectpreviouslyselected.AutoCADusesthecenterpointofacircleorarc,theinsertionpointofablockorshape,thestartpointoftext,andoneendpointofalineortrace.

PolararraywithNumberOfObjects=5,AngleToFill=180,CenterPoint=0,0,0.

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

ArrayRectangularMethodCreatesa2Dor3Drectangulararrayofobjects.

SeeAlso|Example

Signature

RetVal=object.ArrayRectangular(NumberOfRows,NumberOfColumns,NumberOfLevels,DistBetweenRows,DistBetweenColumns,DistBetweenLevels)

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

NumberOfRowsInteger;input-onlyThenumberofrowsintherectangulararray.Thismustbeapositivenumber.Ifthisnumberis1,thenNumberOfColumnsmustbegreaterthan1.

NumberOfColumnsInteger;input-onlyThenumberofcolumnsintherectangulararray.Thismustbeapositivenumber.Ifthisnumberis1,thenNumberOfRowsmustbegreaterthan1.

NumberOfLevelsInteger;input-onlyThenumberoflevelsina3Darray.

DistBetweenRowsDouble;input-onlyThedistancebetweentherows.Ifthedistancebetweenrowsisapositivenumber,rowsareaddedupwardfromthebaseentity.Ifthedistanceisanegativenumber,rowsareaddeddownward.

DistBetweenColumnsDouble;input-onlyThedistancebetweenthecolumns.Ifthedistancebetweencolumnsisapositivenumber,columnsareaddedtotherightofthebaseentity.Ifthedistanceisanegativenumber,columnsareaddedtotheleft.

DistBetweenLevelsDouble;input-onlyThedistancebetweenthearraylevels.Ifthedistancebetweenlevelsisapositivenumber,levelsareaddedinthepositivedirectionfromthebaseentity.Ifthedistanceisanegativenumber,levelsareaddedinthenegativedirection.

RetValVariantArray(arrayofobjects)Thearrayofnewlycreatedobjects.

Remarks

Fora2Darray,specifytheNumberOfRows,NumberOfColumns,DistBetweenRow,andDistBetweenColumns.Forcreatinga3Darray,specifytheNumberOfLevelsandDistBetweenLevelsaswell.

Arectangulararrayisconstructedbyreplicatingtheobjectintheselectionsettheappropriatenumberoftimes.Ifyoudefineonerow,youmustspecifymorethanonecolumnandviceversa.

Theobjectintheselectionsetisassumedtobeinthelowerleft-handcorner,andthearrayisgeneratedupandtotheright.Ifthedistancebetweenrowsisanegativenumber,rowsareaddeddownward.Ifthe

distancebetweencolumnsisanegativenumber,thecolumnsareaddedtotheleft.

AutoCADbuildstherectangulararrayalongabaselinedefinedbythecurrentsnaprotationangle.

RectangulararraywithNumberOfRows=4,NumberOfColumns=3,DistBetweenRows=a,DistBetweenColumns=b.Thebaseentityisrepresentedinblue.

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

AttachAnchorMethodAttachesananchortoanAECEntity.

SeeAlso|Example

Signature

object.AttachAnchoranchor

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthismethodappliesto.

anchorAecAnchor;TheanchorthatwillbeattachedThiscanbeanyoftheAECAnchorobjects.

AttachEntityMethodAnchorsanAECentitytoanAutoCADorAECentity.

SeeAlso|Example

Signature

object.AttachEntityentity

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRefTheobjectthismethodappliesto.

entityAecEntity;input-onlyTheAECentitytobeattachedtotheanchoredobject.

Remarks

AlthoughAecAnchorEntToGridAssemblyinheritstheAttachEntitymethodfromAecAnchor,itisdisabled.

ClearMethodClearsAecRingsandAecProfilesofsegmentsorrings.

SeeAlso|Example

Signature

object.Clear()

objectAecRing,AecProfileTheobjecttobecleared.

ClosestNodeMethodReturnstheindexofthenodeclosesttoagivenpoint.

SeeAlso|Example

Signature

RetVal=object.ClosestNode(Point)

ObjectAecCellLayoutTool,AecClipVol,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecSlice,AecVolumeLayoutToolTheobjectthismethodappliesto.

PointVariant(three-elementarrayofdoubles);input-onlyA3Dpointnearalayoutnode.

RetValLongTheindexoftheclosestnode.

Remarks

ThenodeindexisalsoreturnedbytheNodepropertyofAecAnchorEntToLayoutNode.

ContainsMethodTeststoseeifaringisinsideanotherring.

SeeAlso|Example

Signature

RetVal=object.Contains(Ring)

objectAecRingTheobjectthismethodappliesto.

RingAecRing;input-onlyTheAecRingtocheck.

RetValBooleanTRUE:Theringisinside.FALSE:Theringisnotinside.

ConvertToCurrentAreaDisplayMethodConvertsanareavalueusingtheLinearUnitandAreaDisplayUnitsettings.

SeeAlso|Example

Signature

RetVal=object.ConvertToCurrentAreaDisplay(Area)

objectDatabasePreferencesTheobjectthismethodappliesto.

AreaDouble;input-onlyTheareatoconvert.

RetValDoubleTheresultingarea.

ConvertToCurrentVolumeDisplayMethodConvertsavolumevalueusingtheLinearUnitandVolumeDisplayUnitsettings.

SeeAlso|Example

Signature

RetVal=object.ConvertToCurrentVolumeDisplay(Volume)

objectDatabasePreferencesTheobjectthismethodappliesto.

VolumeDouble;input-onlyThevolumetoconvert.

RetValDoubleTheresultingvolume.

CopyMethodDuplicatesthegivenobjecttothesamelocation.

SeeAlso|Example

Signature

RetVal=object.Copy

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjecttobecopied.

RetValObjectThenewlycreatedduplicateobject.

Remarks

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

CopyFromMethodCopiesAecRingsandAecProfiles.

SeeAlso|Example

Signature

object.CopyFromSourceObject

objectAecProfile,AecRingTheobjectbeingcopiedto.

SourceObjectThesourceobjecttobecopied;inputonly

WhencopyingaProfile,thesourceobjectmustbeanAecProfileobject.

WhencopyingaRing,thesourceobjectmustbeanAecRingobject.

CopyObjectsMethodDuplicatesmultipleobjects(deepcloning).

SeeAlso|Example

Signature

RetVal=object.CopyObjects(Objects[,Owner][,IDPairs])

ObjectAecBaseDatabase,AecDatabaseTheobjectorobjectsthismethodappliesto.

ObjectsVariant(arrayofobjects);input-onlyThearrayofprimaryobjectstobecopied.Alltheobjectsmusthavethesameowner,andtheownermustbelongtothedatabaseordocumentthatiscallingthismethod.

OwnerVariant(asingleobject);input-only;optionalThenewownerforthecopiedobjects.Ifnoownerisspecified,theobjectswillbecreatedwiththesameownerastheobjectsintheObjectsarray.

IDPairsVariant(arrayofIDPairobjects);input-output;optionalInformationonwhathappenedduringthecopyandtranslationprocess.Input:anemptyvariant.Output:anarrayofIDPairobjects.

RetValVariant(arrayofobjects)Anarrayofnewlycreatedduplicateobjects.Only

primaryobjectsarereturnedinthisarray.FormoreinformationonwhatoccuredduringtheCopyObjectsoperation,oralistofobjectsownedbyprimaryobjectsthatwerealsocopied,consulttheIDPairsarray.

Remarks

Tocopyobjectstoanotheropendrawing,settheOwnerparametertotheotherdrawing'smodelspace.

DuringtheCopyObjectsoperation,objectsthatareownedorreferencedbytheprimaryobjectsintheObjectsparameterwillalsobecopied.

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

DeleteMethodDeletesthespecifiedobject.

SeeAlso|Example

Signature

object.Delete

objectTheobjecttobedeleted.

ExpandKeyMethodCalculatesandreturnstheLayerNamethatwouldbegeneratedgiventhesupplied'Key'.

SeeAlso|Example

Signature

RetVal=object.ExpandKey(key)

objectAecLayerKeyStyleTheobjectthismethodappliesto.

keyString;input-onlyThekeytoconvert.

RetValString;LayerName

Remarks

IftheKeyisnotvalid,anemptystringisreturned.

ExportFreeFormMethodExportsafreeformrepresentationtoafile.

SeeAlso|Example

Signatures:Overview

MassElementsobject.ExportFreeForm("FileName"[,CenterAtOrigin])

MassGroupsobject.ExportFreeForm("FileName")

Signatures:Detail

object.ExportFreeForm("FileName"[,CenterAtOrigin])

objectAecMassElementTheobjectbeingexported.

FileNameString;input-onlyThenameofthefiletoexportthefreeformrepresentationto.

CenterAtOriginBoolean;optionalDetermineswhethertheoriginalcoordinatesoftheboundaryrepresentationarestored,orthecoordinatesaretranslatedtoWCS.

TRUE:Usetheoriginalcoordinatesoftheboundaryrepresentation.FALSE:TranslatetheverticesoftheboundaryrepresentationtoWCS.

ThedefaultisTRUE.

object.ExportFreeForm("FileName")

objectAecMassGroupTheobjectbeingexported.

FileNameString;input-onlyThenameofthefiletoexportthefreeformrepresentationto.

Remarks

IfnopathisspecifiedforFileName,thefileiscreatedinthecurrentdrawing'sdirectory.Ifyoudonotspecifyafileextension,noneisadded.

FromPointsMethodMakesaringfrom2DPoints.

SeeAlso|Example

Signature

object.FromPoints(points)

objectAecRingTheobjectthismethodappliesto.

pointsVariant(n-elementarrayofdoubles);input-onlyListof2Dpoints.

Remarks

Theinputforthismethodtakesavariantarrayofdoublesrepresenting2Dpoints.

FromPolylineMethodMakesaringfroma2DPolyline.

SeeAlso|Example

Signature

object.FromPolyline(polyline)

objectAecRingTheobjectthismethodappliesto.

polylineAcadLWPolyline;input-only2Dpolylinetocopythegraphicsfrom.

GenerateLayerMethodGeneratethelayerrecord,givenaLayerKey.

SeeAlso|Example

Signature

RetVal=object.GenerateLayer(Key)

objectAecLayerKeyStyleTheobjectthismethodappliesto.

KeyString;input-only

RetValAcadLayerTheAcadLayerwillbecreatedifnecessary,usingthesettingsfromtheLayerStandardforName,Color,Linetype,etc.

GetAnchorMethodReturnstheanchorattachedtoanobject.

SeeAlso|Example

Signature

RetVal=object.GetAnchor()

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjecttheanchorisattachedto.

RetValAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNode,AecAnchorToRefTheanchorattachedtotheobject.

Remarks

UseanAecAnchorobjectasagenericreturnargument.(TheexamplecodeforthismethoddemonstrateshowtoaccessananchorattachedtoanyAECobject.)

GetBoundingBoxMethod

Getstwopointsofaboxenclosingthespecifiedobject.

SeeAlso|Example

Signature

object.GetBoundingBoxMinPoint,MaxPoint

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

MinPointVariant(three-elementarrayofdoubles);output-onlyThe3DWCScoordinatesspecifyingtheminimumpointoftheobject'sboundingbox.

MaxPointVariant(three-elementarrayofdoubles);output-onlyThe3DWCScoordinatesspecifyingthemaximumpointoftheobject'sboundingbox.

Remarks

ThecornersarereturnedinWCScoordinateswiththeboxedgesparalleltotheWCSX,Y,andZaxes.

MaxPoint

MinPoint

GetExtensionDictionaryMethodGetstheextensiondictionaryassociatedwithanobject.

SeeAlso|Example

Signature

RetVal=object.GetExtensionDictionary

ObjectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

RetValDictionary;output-onlyTheextensiondictionaryfortheobject.

Remarks

Ifanobjectdoesnothaveanextensiondictionary,thismethodwillcreateanewextensiondictionaryforthatobjectandreturnitinthereturnvalue.

YoucanqueryanobjecttoseeifithasanextensiondictionarybyusingtheHasExtensionDictionaryproperty.

GetXDataMethodGetstheextendeddata(XData)associatedwithanobject.

SeeAlso|Example

Signature

object.GetXDataAppName,XDataType,XDataValue

ObjectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNode,AecAnchorExtendedTagToEntAecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

AppNameString;input-onlyANULLstringwillreturnallthedataattachedtotheobject,regardlessoftheapplicationthatcreatedit.

Supplyinganapplicationnamewillreturnonlythedatathatwascreatedbythespecifiedapplication.

XDataTypeVariant(arrayofshorts);output-only

XDataValueVariant(arrayofvariants);output-only

Remarks

Extendeddatacanbeusedtostoreinstance-specificdatacreatedbycustomapplications.Thisdatacanbeaddedtoanyobject.Thisdatafollowstheobject'sdefinitiondata,andismaintainedintheorderthatitwassavedintothedocument.(AutoCADmaintainsthisinformation,butdoesn'tuseit.)

HandleToObjectMethodGetstheobjectthatcorrespondstothegivenhandle.

SeeAlso|Example

Signature

RetVal=object.HandleToObject(Handle)

ObjectAecBaseDatabase,AecDatabaseTheobjectorobjectsthismethodappliesto.

HandleString;input-onlyThehandleoftheobjecttoreturn.

RetValObjectTheobjectthatcorrespondstothegivenhandle.

Remarks

Thismethodcanonlyreturnobjectsinthecurrentdocument.

HasMethodDeterminesifanobjectisamemberofthespecifiedcollection.

SeeAlso|Example

Signature

RetVal=object.Has("Name")

objectAecLayerKeyStyles,AecMaskBlockStyles,AecMVBlockStyles,AecPolygonStyles,AecProfileStyles,AecDisplayRepresentationsThecollectionthismethodappliesto.

NameString;input-onlyThenameoftheobjecttocheckfor.

RetValBooleanTRUE:Collectioncontainstheobject.FALSE:Collectiondoesnotcontaintheobject.

HighlightMethodSetsthehighlightstatusforthegivenobject,orforallobjectsinagivenselectionset.

SeeAlso|Example

Signature

object.HighlightHighlightFlag

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

HighlightFlagBoolean;input-only

TRUE:Theobjectishighlighted.

FALSE:Theexistinghighlightisremovedfromtheobject.

Remarks

Oncethehighlightflagforanobjecthasbeenset,acalltotheUpdateorRegenmethodisrequiredtoviewthechange.

Notethatthisfunctiondoesnotreturnthecurrenthighlightstatusofanobject.

ImportFreeFormMethodImportsafreeformrepresentationfromafile.

SeeAlso|Example

Signature

object.ImportFreeForm("FileName"[,CenterAtLocation])

objectAecMassElementTheobjectbeingimportedto.Thismustbeafreeformmasselement(Type=aecMassElementTypeFreeForm).

FileNameString;input-onlyThenameofthefiletoimportthefreeformrepresentationfrom.

CenterAtLocationBoolean;optional.Controlswhetherthetheverticesoftheimportedboundaryrepresentationaretranslatedtotheinsertionpointofthemasselement.TRUE:Translatetheboundaryrepresentationtothemasselementinsertionpoint.FALSE:Usethecoordinatessavedwiththeexportedboundaryrepresentation.

ThedefaultisFALSE.

Remarks

IfnopathisspecifiedforFileName,thecurrentdrawing'sdirectoryissearched.

InitMethodInitializationfunctionwhichmustbecalledbeforetheAECdatabaseobjectcanbeaccessed

SeeAlso|Example

Signature

object.Init(AcadDatabaseObject)

objectAecBaseDatabase,AecBaseDatabasePreferencesTheobjectthismethodappliesto.

AcadDatabaseObjectAcadDatabase;input-onlyThedatabase.

IntersectMethodBooleanIntersectsanAecProfilewiththecurrentAecProfile.

SeeAlso|Example

Signature

object.Intersect(Profile)

objectAecProfileTheobjectthismethodappliesto.

ProfileAecProfile;input-onlyTheprofiletointersectwiththecurrentprofile.

IntersectWithMethod

Getsthepointswhereoneobjectintersectsanotherobjectinthedrawing.

SeeAlso|Example

Signature

RetVal=object.IntersectWith(IntersectObject,ExtendOption)

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

IntersectObjectObject,input-only;Thiscanbeanydrawingentityobject.

ExtendOptionAcExtendOptionenum;input-onlyThisoptionspecifiesifoneortheother,both,ornoneoftheentitiesaretobeextendedinordertoattemptanintersection.

acExtendNone Doesnotextendeitherobject.

acExtendThisEntity Extendsthebaseobject.

acExtendOtherEntity Extendstheobjectpassedasanargument.

acExtendBoth Extendsbothobjects.

RetValVariant(arrayofdoubles)Thearrayofpointswhereoneobjectintersectsanotherobjectinthedrawing.

Remarks

Ifthetwoobjectsdonotintersect,nodataisreturned.Youcanrequestthepointofintersectionthatwouldoccurifoneorbothoftheobjectswereextendedtomeettheother.Forexample,supposeadrawingcontainsthethreelinesshownintheillustrationbelow.Line1isthebaseobjectfromwhichthismethodwascalledandline3istheobjectpassedasaparameter.IftheExtendOptionpassedisacExtendThisEntity,pointAisreturnedasthepointwhereline1wouldintersectline3ifline1wereextended.IftheExtendOptionisacExtendOtherEntity,nodataisreturnedbecauseevenifline3wereextended,itwouldnotintersectline1.

IftheintersectiontypeisacExtendBothEntitiesandline2ispassedastheparameterentity,pointBisreturned.IftheExtendOptionisacExtendNoneandline2istheparameterentity,nodataisreturned.

line3

line2

line1

ItemMethodReturnsamemberobjectofacollection.

SeeAlso|Example

Signature

RetVal=object.Item(Index)

objectAllCollections,AecDisplayConfigurations,AecDisplaySets,AecDisplayRepresentations,AecDisplayComponents,AecMVBlockDisplayRepDefs,AecViewBlockDefs,AecsConnectionNodesThecollectionthismethodappliesto.

IndexVariant;input-onlyTheindexlocationinthecollectionforthememberitemtoquery.Theindexmustbeeitheranintegerorastring.Ifaninteger,theindexmustbebetween0andN-1,whereNisthenumberofobjectsinthecollection.

RetValObject;Theobjectatthegivenindexlocationinthecollection.

Remarks

Thismethodsupportscase-sensitivestringbasediteration.Forexample,youcouldreferencetheMulti-ViewBlockdefinitionnamed"Fixture1"throughthefollowingstatement:

SetmvBlock=cMvBlocks.Item("Fixture1")

MirrorMethod

Createsamirrorimagecopyofaplanarobjectaroundanaxis.

SeeAlso|Example

Signature

RetVal=object.Mirror(Point1,Point2)

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

Point1Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthefirstpointofthemirroraxis.

Point2Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthesecondpointofthemirroraxis.

RetValMirroredobjectThiscanbeanydrawingentityobject.

Remarks

Thetwopointsspecifiedasparametersbecometheendpointsofalinearoundwhichthebaseobjectisreflected.

Selectedobject

Point1andPoint2specifyingthemirroraxis

Mirroredobject

Thismethodplacesthereflectedimageintothedrawingandretainstheoriginalobject.Toremovetheoriginalobject,usetheDeletemethod.

YoucanmirroraViewportobjectinpaperspace,althoughdoingsohasnoaffectonitsmodelspacevieworonmodelspaceobjects.

AutoCADcheckstoseeiftheobjecttobecopiedownsanyotherobject.Ifitdoes,itperformsacopyonthoseobjectsaswell.Theprocesscontinuesuntilallownedobjectshavebeencopied.

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

Mirror3DMethodCreatesamirrorimageofthegivenobjectaboutaplane.

SeeAlso|Example

Signature

RetVal=object.Mirror3D(Point1,Point2,Point3)

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

Point1Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthefirstpointofthemirrorplane.

Point2Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthesecondpointofthemirrorplane.

Point3Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthethirdpointofthemirrorplane.

RetValMirroredobject

Thisobjectcanbeanydrawingentityobject.

Remarks

Objectmirroredaboutaplanedefinedbythreepoints

AutoCADcheckstoseeiftheobjecttobecopiedownsanyotherobject.Ifitdoes,itperformsacopyonthoseobjectsaswell.Theprocesscontinuesuntilallownedobjectshavebeencopied.

NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.

MoveMethod

Movesanobjectalongavector.

SeeAlso|Example

Signature

object.MovePoint1,Point2

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

Point1Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthefirstpointofthemovevector.

Point2Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthesecondpointofthemovevector.

Remarks

Thetwopointsyouspecifydefineadisplacementvectorindicatinghowfarthegivenobjectistobemovedandinwhatdirection.

Givenobjectwithtwopointsindicated Movedobject

NodeLocationMethodReturnsthelocationofthenodeatagivenindex.

SeeAlso|Example

Signature

RetVal=object.NodeLocation(Node)

ObjectAecCellLayoutTool,AecClipVol,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecSlice,AecVolumeLayoutToolTheobjectthismethodappliesto.

NodeLong;input-onlyIndexofthenode.

RetValVariant(three-elementarrayofdoubles)Thelocationofthenode.

Remarks

ThenodeindexisreturnedbytheNodepropertyofAecAnchorEntToLayoutNode.

ObjectIDToObjectMethodGetstheobjectthatcorrespondstothegivenobjectID.

SeeAlso|Example

Signature

RetVal=object.ObjectIDToObject(ID)

ObjectAecBaseDatabase,AecDatabaseTheobjectorobjectsthismethodappliesto.

IDLong;input-onlyTheobjectIDoftheobjecttoreturn.

RetValObjectTheobjectthatcorrespondstothegivenobjectID.

Remarks

Thismethodcanonlyreturnobjectsinthecurrentdocument.

ReleaseAnchorMethodRemovesananchorfromanobject.

SeeAlso|Example

Signature

object.ReleaseAnchor()

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthismethodappliesto.

RemoveMethodRemovesanitemfromacollection.

SeeAlso|Example

Signatures:Overview

AecDictionary,LayerKeyStyles,MaskBlockStyles,MassElementStyles,Multi-viewBlockStyles,PolygonStyles,ProfileStyles

collection.Remove(Name)

LayerKeys,Rings

collection.Remove(Index)

ViewBlockDefscollection.Remove(AcadBlock)

Signatures:Detail

object.Remove(Name)

objectAecDictionary,AecLayerKeyStyles,AecMaskBlockStyles,AecMassElementStyles,AecMVBlockStyles,AecPolygonStyles,

AecProfileStyles,AecDisplayRepresentations,AecViewBlockDefsThecollectionthismethodappliesto.

NameString;input-onlyThenameoftheitemtoberemoved.

object.Remove(Index)

objectAecLayerKeys,AecRingsThecollectionthismethodappliesto.

IndexLong;input-onlyTheindexnumbervalueoftheitemtoremovefromthecollection.

object.Remove(AcadBlock)

objectAecViewBlockDefsThecollectionyouareremovingablockfrom.

AcadBlockAcadBlockobject;input-onlyTheblocktoremovefromthecollection.

RenameMethodRenamesaniteminanAecDictionary.

SeeAlso|Example

Signature

RetVal=object.Rename(OrigName,NewName)

ObjectAecDictionary,AecLayerKeyStyles,AecMaskBlockStyles,AecMassElementStyles,AecMVBlockStyles,AecPolygonStyles,AecProfileStylesTheobjectthismethodappliesto.

OrigNameString;input-onlyTheoriginalnameoftheitem.

NewNameString;input-onlyThenewnameoftheitem.

Remarks

Objectswillmaintaintheirreferencetoastyleevenifithasbeenrenamed.

RotateMethod

Rotatesanobjectaroundabasepoint.

SeeAlso|Example

Signature

object.RotateBasePoint,RotationAngle

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

BasePointVariant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthepointthroughwhichtheaxisofrotationisdefinedasparalleltotheZaxisoftheUCS.

RotationAngleDouble;input-onlyTheangleinradianstorotatetheobject.Thisangledetermineshowfaranobjectrotatesaroundthebasepointrelativetoitscurrentlocation.

Remarks

Rotate3DMethod

Rotatesanobjectarounda3Daxis.Point1andPoint2definethelinethatbecomestheaxisofrotation.

SeeAlso|Example

Signature

object.Rotate3DPoint1,Point2,RotationAngle

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

Point1Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthefirstpointoftheaxisline.

Point2Variant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthesecondpointoftheaxisline.

RotationAngleDouble;input-onlyTheangleinradianstorotatetheobjectabouttheselectedaxis.

Remarks

SaveAsDefaultMethodSavestheDatabasePreferencestotheregistry.

SeeAlso|Example

Signature

object.SaveAsDefault()

objectAecBaseDatabasePreferencesTheobjectthismethodappliesto.

ScaleEntityMethod

ScalesanobjectequallyintheX,Y,andZdirections.

SeeAlso|Example

Signature

object.ScaleEntityBasePoint,ScaleFactor

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

BasePointVariant(three-elementarrayofdoubles);input-onlyThe3DWCScoordinatesspecifyingthebasepoint.

ScaleFactorDouble;input-onlyThefactorbywhichtoscaletheobject.Thedimensionsoftheobjectaremultipliedbythescalefactor.Ascalefactorgreaterthan1enlargestheobject.Ascalefactorbetween0and1reducestheobject.Thescalefactormustbegreaterthan0.0.

Remarks

BasePoint

ScaleFactor=0.5andScaleFactor=2

ScaleXYMethodScalesaprofileintheXandYdirections.

SeeAlso|Example

Signature

object.ScaleXY(X,Y)

objectAecProfileTheobjectthismethodappliesto.

XDouble;input-onlyTheXfactortoscaleby.

YDouble;input-onlyTheYfactortoscaleby.

SetXDataMethodSetstheextendeddata(XData)associatedwithanobject.

SeeAlso|Example

Signature

object.SetXDataXDataType,XData

ObjectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

XDataTypeVariant(arrayofshort);input-only

See ExtendedDataintheDXFReferencefortheextendeddatagroupcodestospecifyforthisargument.

XDataArrayofVariant;input-only

Remarks

Extendeddatacanbeusedforstoringinstance-specificdatacreatedbycustomapplications.Thisdatacanbeaddedtoanyentity.Thisdatafollowstheentity'sdefinitiondataandismaintainedintheorderinwhichitwassavedintothedocument.(AutoCADmaintainsthisinformationbutdoesn'tuseit.)

SubtractMethodSubtractsanAecProfilefromthecurrentAecProfile.

SeeAlso|Example

Signature

object.Subtract(Profile)

objectAecProfileTheobjectthismethodappliesto.

ProfileAecProfile;input-onlyTheprofiletosubtract.

TransformByMethodMoves,scales,orrotatesanobjectgivena4x4transformationmatrix.

SeeAlso|Example

Signature

object.TransformByTransformationMatrix

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

TransformationMatrixVariant(4x4arrayofdoubles);input-onlyA4x4matrixspecifyingthetransformationtoperform.

Remarks

Thefollowingtabledemonstratesthetransformationmatrixconfiguration,whereR=Rotation,andT=Translation:

R00 R01 R02 T0

R10 R11 R12 T1

R20 R21 R22 T2

0 0 0 1

Thismethodwillreturnanerrorifthetransformationmatrixisnotcorrect.

Sampletransformationmatricesareprovidedintheexamplecodeforthismethod.

UpdateMethodUpdatestheobjectinthedrawingwindow.

SeeAlso|Example

Signature

object.Update

ObjectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthismethodappliesto.

Properties

image image image image image image image image image image image image image image image image image image image image image image image image image image

A

AdjustSizingSpecifiesifthesizeoftheanchoredobjectisadjustedtomatchthesizeofthegridcell.

AllowLongSymbolNamesDeterminesifsymbolnamesmayincludeextendedcharactersets,ormorethan31characters.

AllowVariationSpecifiesiftheanchoredobjectisallowedtovary.

AlternateNameTheAlternateNameoftheStyle.

AlwaysImportLayerStandardSpecifieswhethertoalwaysimportanewerlayerstandard.

AngleSpecifiestheangleofthelayoutgrid.

Angle1Deviationofcutplaneatstartingedgewherezeroisperpendiculartotheclipline.

Angle2DeviationofcutplaneatendingedgewherezeroisperpendiculartotheclipLine.

AngleFromNodeSpecifiestheanglefromtheanchoredentitytothenode.

AngularAzimuthTheformatusedtodisplayangles.

AngularDisplayFormatSpecifiestheunitusedwhenangularmeasurementsaredisplayed.

AngularPrecisionSpecifiestheangularprecisionforthedrawing.

ApplicationGetstheApplicationobject.

ApplyResizeSpecifiesiftheanchoredobjectisresizedwhenthelayoutcellisresized.

AreaGetstheareaofanobject.

AreaDisplayUnitTheunitusedwhenareameasurementsaredisplayed.

AreaPrecisionTheprecisiontowhichareameasurementsaredisplayed.

AreaSuffixThesuffixdisplayedafteranareaunitinthedrawing.

B

BasePointGetsandsetsthebasepointforthedrawingasanXYZ.

BasePointNEGetsandsetsthebasepointforthedrawingasanENZ.

BayAngleSpecifiesthebayangleofthelayoutgrid.

BlockBasedLayerOffBehaviorImmediateandindependentlayeron/offcontrolofdisplaycomponents.

BlocksGetstheBlockscollectionforthedrawing.

BottomOffsetSpecifiesthebottomoffsetoftheanchoredobjecttothegriditisattachedto.

BoundarySpecifiestheboundaryobjectattachedtothegrid.

BoundsGetstheupperleftandlowerrightcornersoftheprofile.

C

CellSpecifiesthegridcelltoanchortheentityto.

CenterOnNodeSpecifiesiftheanchoredobjectiscenteredonthelayoutnode.

CentroidGetsthecenterofareaormassforaprofileshape.

ColorSpecifiestheobject'scolor.

ContourlinesPerSurfaceSpecifiesthenumberofcontourlines(isolines)persurfaceonobjects.

CoordinatePrecisionSpecifiestheprecisiontowhichcoordinatemeasurementsaredisplayed.

CoordinatesReturnstheverticesofaringorprofile.

CountGetsthenumberofitemsinthecollection.

CreateDimscaleOverrideAutomaticallycreateadimscaleoverride.

D

DatabaseGetsthedatabaseinwhichtheobjectbelongs.

DatabaseScaleSpecifiesthedatabasescaleatwhichthehorizontalaxisofthedrawingisdisplayed.

DepthGetsorsetsthesizeofthegridormasselementinitsrelativeYdirection.

DescriptionGetsorsetstextdescribingtheAECObject.

DictionariesGetstheDictionariescollectionforthedocument.

DimStylesGetstheDimStylescollectionforthedocument.

DisplaySilhouetteControlsifsilhouettecurvesofsolidobjectsaredisplayedinWireframemode.

DocumentGetsthedocument(drawing)inwhichtheobjectbelongs.

E

EdgeWidthSpecifiestheedgewidthofthepolygonstyle.

EdgeWidthJustifySpecifieswhetheredgesaredisplayedinside,outside,orcenteredontheAECPolygonvertices.

ElevationModelSpaceSpecifiestheelevationsettinginthemodelspace.

ElevationPaperSpaceSpecifiestheelevationsettinginthepaperspace.

ElevationPrecisionSpecifiestheprecisiontowhichelevationmeasurementsaredisplayedinthedrawing.

EndOffsetSpecifiestheoffsetdistancefromtheendpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.

F

FacetDeviationSpecifiesthealloweddeviationwhenfacettingcurvedlinesandsurfaces.

FacetMaximumSpecifiesthemaximumnumberoffacetsusedforacircle.

FlipXDeterminesiftheanchoredobjectisflippedabouttheXaxisofthecurveitisanchoredto.

FlipYDeterminesiftheanchoredobjectisflippedabouttheYaxisofthecurveitisanchoredto.

FlipZDeterminesiftheanchoredobjectisflippedabouttheZaxisofthecurveitisanchoredto.

G

GroupsGetstheGroupscollectionforthedocument.

H

HandleGetsthehandleofanobject.

HasExtensionDictionaryDeterminesiftheobjecthasanextensiondictionaryassociatedwithit.

HeightSpecifiestheheightoftheobject.

HyperlinksGetstheHyperlinkscollectionforanentity.

I

IndexReturnsthepositionoftheitemwithinitscollection.

InsertionPointSpecifiestheinsertionpointoftheprofile.

InsideRadiusSpecifiestheinsideradiusofthelayoutgrid.

J

K

KeysReturnsthecollectionoflayerkeysinalayerkeystyle.

L

LayerSpecifiesthelayertheobjectison.

LayerFileSpecifiesthenameofthefilecontainingdefaultlayerstandardandkeystyledefinitions.

LayerKeyStyleSpecifiesthelayerkeystylefortheobject.

LayerKeyStylesReturnsthecollectionoflayerkeystylesinthecurrentdrawing.

LayersGetstheLayerscollectionforthedocument.

LayerStandardThelayerstandardtoapplytothedrawing.

LayoutCurveProvidesaccesstolayoutcurvegeometry.

LayoutGrid2DIdentifiesthe2Dlayoutgridthatownstheobject.

LayoutGrid3DIdentifiesthe3Dlayoutgridthatownstheobject.

LayoutsGetstheLayoutscollectionforthedocument.

LeaderExtension1Specifiesthefirstleaderextension.

LeaderExtension2Specifiesthesecondleaderextension.

LeftOffsetSpecifiestheleftoffsetfortheanchoredobject.

LimitsSpecifiesthedrawinglimits.

LinearDisplayFormatSpecifiestheformatusedtodisplaylinearmeasurementvalues.

LinearPrecisionSpecifiesthelinearprecisionforthedrawing.

LinearUnitSpecifiestheunitusedtodisplaylinearvalues.

LineTypeSpecifiesthelinetypeoftheobject.

LinetypesGetstheLinetypescollectionforthedocument.

LinetypeScaleSpecifiesthelinetypescaleofanentity.

LineWeightSpecifiesthelineweightoftheobject.

LineweightDisplaySpecifieswhetherlineweightsaredisplayedinmodelspaceforthedrawing.

LocationSpecifiestheinsertionpositionoftheobject.

LowerExtensionSpecifiesthedistanceofthelowercutplanebelowtheclipvolumeposition.

M

MaskBlockStylesReturnsthecollectionofmaskblockstylesinthespecifieddrawingdocumentordatabase.

MassElementStylesReturnsthecollectionofmasselementstylesinthespecifieddrawingdatabase.

MassGroupGetsorsetstheparentmassgroupofamasselementormassgroup.

MassGroupNameSpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.

MassGroupsReturnsthecollectionofmassgroupsinadocumentordatabase.

MaxActiveViewportsSpecifiesthemaximumnumberofactiveviewports.

MeasurementUnitIdentifiesthesystemofunitsusedtodisplaymeasurementsinthedrawing.

ModelSpaceGetstheModelSpacecollectionforthedocument.

MVBlockRefGetsorsetsamulti-viewblockreferenceforaviewblockorcollectionofviewblocks.

MVBlockStylesReturnsthecollectionofmulti-viewblockstylesinthespecifieddocumentordatabase.

N

NameReturnsthenameoftheobject.

NodeSpecifiesthelayoutnodetheanchorattachesanobjectto.

NodesReturnsthecollectionofnodesonthelayoutcurve.

NormalSpecifiesthenormalvectoroftheAECobject.

NorthRotationSpecifiestheanglealignedtonorthwithinadrawing.

O

ObjectIDGetstheobjectIDoftheobject.

ObjectNameGetstheAutoCADclassnameoftheobject.

ObjectSortByPlottingTogglessortingofdrawingobjectsbyplottingorder.

ObjectSortByPSOutputTogglessortingofdrawingobjectsbyPostScriptoutputorder.

ObjectSortByRedrawsTogglessortingofdrawingobjectsbyredraworder.

ObjectSortByRegensTogglessortingofdrawingobjectsbyregenerationorder.

ObjectSortBySelectionTogglessortingofdrawingobjectsbyobjectselection.

ObjectSortBySnapTogglessortingofdrawingobjectsbyobjectsnap.

OffsetSpecifiestheoffsetfromthelayoutnode.

OLELaunchDetermineswhethertolaunchtheparentapplicationwhenplottingOLEobjects.

OperationSpecifieshowobjectsarecombined.

OverridesEnabledSpecifieswhetherlayeroverridesareappliedtothestylewhenalayerisgeneratedfromakey.

OverrideSettingsReturnsthecollectionoflayerkeyoverridesettingsforalayerkeystyle.

OwnerIDGetstheobjectIDoftheowner(parent)object.

P

PaperSpaceGetsthePaperSpacecollectionforthedocument.

PlotConfigurationsGetsthePlotConfigurationscollectionforthedocument.

PlotStyleNameSpecifiestheplotstylenamefortheobject.

PlottableSpecifieswhetherthelayergeneratedfromthekeyisplottable.

PolygonStylesReturnsthecollectionofpolygonstylesinthespecifieddrawingdatabase.

PreferencesReturnsthePreferencesobjectforthespecifieddrawing.

ProfileReturnsorsetstheobject'sprofile.

ProfileStyleSpecifiestheprofilestyleofthemasselement.

ProfileStyleNameSpecifiesthenameofthemasselement'sprofilestyle.

ProfileStylesReturnsthecollectionofprofilesinthespecifieddrawingdatabase.

ProjectNameSpecifiesthenameoftheprojectthatthedrawingbelongsto.

Q

R

RadiusSpecifiestheradiusofcurvedmasselements.

ReferenceSpecifiestheobjectbeinganchoredto.

RegisteredApplicationsGetstheRegisteredApplicationscollectionforthedocument.

RemoveableSpecifieswhetheryoucanremovethelayerkeyfromthelayerkeystyle.

RenderSmoothnessSpecifiesthesmoothnessofshaded,rendered,andhiddenline-removedobjects.

ResizeOffsetSpecifiestheoffsetoftheanchoredobjecttothecellboundarywhenthecellisresized.

RightOffsetSpecifiestherightoffsetfortheanchoredobject.

RingsReturnsthecollectionofringsthatmakeuptheprofile.

RiseSpecifiestheriseofgabledmasselements.

RotationSpecifiestherotationreferenceanglefortheobject.

S

ScaleOnInsertSpecifieswhetherobjectsareautomaticallyscaledwhen

insertedintothedrawing.

ScaleXSpecifiestheXdirectionscalefactoroftheinsertedblockorentity.

ScaleYSpecifiestheYdirectionscalefactoroftheinsertedblockorentity.

ScaleZSpecifiestheZdirectionscalefactoroftheinsertedblockorentity.

SegmentPerPolylineSpecifiesthenumberoflinesegmentstobegeneratedforeachpolylinecurve.

SelfIntersectsDeterminesiftheprofileisself-intersecting.

ShapeSpecifiestheshapeofthelayoutgrid.

Side1Specifiesthelengthofthecutplanealongthestartingedge.

Side2Specifiesthelengthofthecutplanealongtheendingedge.

SolidFillSpecifiesifmultilines,traces,solids,allhatches(includingsolid-fill)andwidepolylinesarefilledin.

SpacingSpecifiesthespacingbetweennodesorforanindividualnodeonalayouttool.

StartOffsetSpecifiestheoffsetdistancefromthestartpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.

StyleSpecifiesthestyleoftheobject.

StyleNameSpecifiesthenameofthestylethatappliestotheobject.

T

TextFrameDisplayTogglesthedisplayofframesfortextobjectsinsteadofdisplayingthetextitself.

TextHeightSpecifiesthedefaultheightoftextinthedrawing.

TextStylesGetstheTextStylescollectionforthedocument.

TopOffsetSpecifythetopoffsetfortheanchoredobject.

TrueColorReturnsthetruecoloroftheobject.

TypeForlayoutcurves,specifieshownodesarespecifiedalongthecurve;formasselements,specifiestheshapeofthemasselement.

U

UseModelExtentsDeterminesiftheheightandlowerextensionaresetautomaticallyusingmodelextents.

UseNodeCSSpecifieswhethertousethecoordinatesystemofthelayoutnode.

UserCoordinateSystemsGetstheUCSscollectionforthedocument.

V

ValidTeststhevalidityoftheobject.

ValueForlayeroverrides,specifiesthevalueofthelayerkeystyleoverride;forlayoutcurves,specifieseitherthespacingbetweennodesorthenumberofnodesonthelayoutcurve.

VerticalScaleSpecifiesthescaleatwhichtheverticalaxisofthedrawingisdisplayed(inLandDevelopmentDesktoponly).

ViewBlocksReturnsthecollectionofviewblocksusedfordisplayrepresentationsbythemulti-viewblockreference.

ViewportsGetstheViewportscollectionforthedocument.

ViewsGetstheViewscollectionforthedocument.

VisibleSpecifieswhethertheobjectorapplicationisvisible.

VoidSpecifiesifaringproducesavoidinaprofile.

VolumeReturnsthevolumeofthemasselementormassgroup.

VolumeDisplayUnitSpecifiestheunitsusedtodisplayvolumemeasurements.

VolumePrecisionSpecifiesthenumberofdecimalplacesdisplayedforvolumemeasurements.

VolumeSuffixThesuffixstringaddedwhenvolumemeasurementsaredisplayedinthedrawing.

W

WidthSpecifiesthewidthoftheobject.

WindowStateSpecifiesthestateoftheapplicationordocumentwindow.

WindowTitleGetsthetitleofthedocumentwindow.

X

XCountSpecifiesthenumberofnodesalongtheXdirection.

XDistanceSpecifiesthedistancealongthecurve'sXaxistotheanchoredobject.

XEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheXdirectiongridcurve,whichmaybeusedtoreducethegridsize.

XNodesReturnsthecollectionofnodesalongtheXdirectionofthelayoutgrid.

XOffsetSpecifiestheoffsetintheXdirectionoftheviewblockwithinthemulti-viewblock.

XPositionFromSpecifiesthepositiononthecurvefromwhichtheXDistancetoananchoredobjectismeasured.

XPositionToSpecifiesthepositionontheanchoredobjecttomeasureXDistanceto.

XRefEditDeterminesifthecurrentdrawingcanbeeditedinplacewhenbeingreferencedbyanotheruser.

XRefLayerVisibilityDeterminesthevisibilityofxref-dependentlayersandspecifiesifnestedxrefpathchangesaresaved.

XrefOverlaysUseOwnDisplayConfigWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.

XRotationSpecifiestherotationoftheanchoredobjectaroundtheXaxis.

XSpacingSpecifiesthespacingbetweennodesalongtheXdirectionofthelayoutgrid.

XStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheXdirectiongridcurve,whichmaybeusedtoreducethegridsize.

XTypeSpecifiestherulecontrollingnodespacingalongtheXdirection.

Y

YAlignmentSpecifiesthealignmentoftheanchoredobjectinrelationtothebaselineoftheassembly.

YCountSpecifiesthenumberofnodesalongtheydirection.

YDistanceSpecifiesthedistancealongthecurve'sYaxistotheanchoredobject.

YEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheYdirectiongridcurve,whichmaybeusedtoreducethegridsize.

YNodesReturnsthecollectionofnodesalongtheYdirectionofthelayoutgrid.

YOffsetSpecifiestheYoffsetoftheanchoredobject,ortheoffsetintheYdirectionoftheviewblockwithinthemulti-viewblock.

YPositionFromSpecifiesthepositiononthecurvefromwhichtheYDistancetoananchoredobjectismeasured.

YPositionToSpecifiesthepositionontheanchoredobjecttomeasureYDistanceto.

YRotationSpecifiestherotationoftheanchoredobjectaroundthelayoutnode'sYaxis.

YSpacingSpecifiesthespacingbetweennodesalongtheYdirectionofthelayoutgrid.

YStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheYdirectiongridcurve,whichmaybeusedtoreducethegridsize.

YTypeSpecifiestherulecontrollingnodespacingalongtheYdirection.

Z

ZCountSpecifiesthenumberofnodesalongtheZdirection.

ZDistanceSpecifiesthedistanceabovethecurvetotheanchoredobject.

ZEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheZdirectiongridcurve,whichmaybeusedtoreducethegridsize.

ZNodesReturnsthecollectionofnodesalongtheZdirectionofthe3Dlayoutgrid.

ZOffsetSpecifiestheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.

ZoomSpecifiesthefocallengthofthecamera,inmillimeters.

ZPositionFromSpecifiesthepositiononthecurvefromwhichtheZDistancetoananchoredobjectismeasured.

ZPositionToSpecifiesthepositionontheanchoredobjecttomeasureZDistanceto.

ZRotationSpecifiestherotationoftheanchoredobjectaroundtheZaxis.

ZSpacingSpecifiesthespacingbetweennodesalongtheZdirectionofthelayoutgrid.

ZStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheZdirectiongridcurve,whichmaybeusedtoreducethegridsize.

ZTypeSpecifiestherulecontrollingnodespacingalongtheZdirection.

ActiveSetPropertyReturnstheactivedisplaysetforthespecifiedviewport.

SeeAlso|Example

Signature

RetVal=object.ActiveSet(ViewPort)

objectAecDisplaySetsTheobjectthispropertyappliesto.

ViewPortAcadObject;input-onlyTheAcadViewportorAcadPViewportthatthedisplayconfigurationappliesto.

RetValAecDisplaySetTheactivedisplaysetforthespecifiedviewport.

AdjustSizingPropertySpecifieswhetheryoucanoverridethedefaultoffsetvaluesoftheanchoredobject,thuschangingitssize.

SeeAlso|Example

Signature

object.AdjustSizing

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

AdjustSizingBoolean;read-writeTRUE:Offsetscanbemodified.FALSE:Offsetscannotbemodified.

AllowByMaterialPropertyDeterminesiftheByMaterialpropertyshouldbeapplied.

SeeAlso|Example

Signature

object.AllowByMaterial

objectAecDisplayComponentEntityTheobjectthispropertyappliesto.

AllowByMaterialBoolean;read-write

Remarks

Thisisanadvancedsettingthatshouldrarelyneedtobechanged.

AllowVariationPropertySpecifiesiftheanchoredobjectisallowedtovary.

SeeAlso|Example

Signature

object.AllowVariation

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

AllowVariationBoolean;read-writeTRUE:Allowvariation.FALSE:Don'tallowvariation.

AlternateNamePropertyTheAlternateNameoftheStyle.

SeeAlso|Example

Signature

object.AlternateName

objectAecMaskBlockStyle,AecLayerKeyStyle,AecDictRecord,AecMVBlockStyle,AecPolygonStyle,AecProfileStyleTheobjectthispropertyappliesto.

AlternateNameString;read-writeTheAlternateNameoftheStyle.

AlwaysImportLayerStandardPropertySpecifieswhethertoalwaysimportanewerlayerstandard.

SeeAlso|Example

Signature

object.AlwaysImportLayerStandard

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AlwaysImportLayerStandardBoolean;read-writeSpecifieswhethertoalwaysimportanewerlayerstandard.

AnglePropertySpecifiestheangleofthelayoutgrid,ortheangleofthehatchpatternforadisplaycomponent.

SeeAlso|Example

Signature

object.Angle

objectAecDisplayComponentHatch,AecLayoutGrid2DTheobjectthispropertyappliesto.

AngleACAD_ANGLE;read-writeTheangleofthelayoutgrid,ortheangleofthehatchpatternforadisplaycomponent.

Angle1PropertyDeviationofcutplaneatstartingedgewherezeroisperpendiculartotheclipline.

SeeAlso|Example

Signature

object.Angle1

objectAecClipVolTheobjectthispropertyappliesto.

Angle1Double(radians);read-write

Remarks

Theangleisspecifiedinradians.

Angle2PropertyDeviationofcutplaneatendingedgewherezeroisperpendiculartotheclipLine.

SeeAlso|Example

Signature

object.Angle2

objectAecClipVolTheobjectthispropertyappliesto.

Angle2Double(radians);read-write

Remarks

Theangleisspecifiedinradians.

AngleFromNodePropertySpecifiestheanglefromtheanchoredentitytothenode.

SeeAlso|Example

Signature

object.AngleFromNode

objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

AngleFromNodeDouble;read-writeTheangle,inradians,fromtheanchoredentitytothenode.

AngularAzimuthProperty

Theformatusedtodisplayangles.

SeeAlso|Example

Signature

object.AngularAzimuth

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AngularAzimuthLong;read-write

0: UseBearings

1: UseNorthAzimuths

2: UseSouthAzimuths

AngularDisplayFormatProperty

Specifiestheunitusedwhenangularmeasurementsaredisplayed.

SeeAlso|Example

Signature

object.AngularDisplayFormat

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AngularDisplayFormatLong;read-write

0: UseDegrees

1: UseDegrees/Minutes/Seconds

2: UseGrads

3: UseRadians

4: UseSurveyor

Remarks

WhenyoutypedegreesatAutoCADcommandprompts,typetheminthedecimalformatindicated(DD.MMSS).Useaperiod(.)betweenthedegreevalueandtheminutesandseconds.Forexample,toenter67°45’15"typethevalueas67.4515.Ifyouusebearings,thentypethebearingquadrantfirst,andthentheangleindegrees.

AngularPrecisionPropertySpecifiestheangularprecisionforthedrawing.

SeeAlso|Example

Signature

object.AngularPrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AngularPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.

Remarks

Thisisusedtodisplayminutesandseconds.

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.AutoCADcommandsalwayscalculateallnumbersuptothehighestinternalprecision.

ApplicationPropertyGetstheApplicationobject.

SeeAlso|Example

Signature

object.Application

objectAllobjects.Theobjectorobjectsthispropertyappliesto.

ApplicationApplicationobject;read-only

Remarks

TheApplicationobjectrepresentstheapplication'sframecontrolsandpathsettings,andprovidesthemeanstonavigatedowntheobjecthierarchy.

ApplyResizePropertySpecifiesiftheanchoredobjectisresizedwhenthelayoutcellisresized.

SeeAlso|Example

Signature

object.ApplyResize

objectAecAnchorEntToLayoutVolume,AecAnchorToLayoutCellTheobjectthispropertyappliesto.

ApplyResizeBoolean;read-writeTRUE:Applyresize.FALSE:Don'tapplyresize.

Remarks

IfyouwanttosettheResizeOffsetproperty,youmustfirstsetApplyResizetoTrueinorderforthespecifiedoffsettotakeaffect.

AreaPropertyGetstheareaofanobject.

SeeAlso|Example

Signature

object.Area

objectAecProfile,AecSliceTheobjectthispropertyappliesto.

AreaDouble;read-onlyTheareaenclosedbytheobject.

AreaDisplayUnitPropertyTheunitusedwhenareameasurementsaredisplayed.

SeeAlso|Example

Signature

object.AreaDisplayUnit

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AreaDisplayUnitAecBuiltInUnitenum;read-write

AreaPrecisionPropertyTheprecisiontowhichareameasurementsaredisplayed.

SeeAlso|Example

Signature

object.AreaPrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AreaPrecisionLong;read-writeThedisplayprecisionusedforareas.

Remarks

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.

AreaSuffixPropertyThesuffixdisplayedafteranareaunitinthedrawing.

SeeAlso|Example

Signature

object.AreaSuffix

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

AreaSuffixString;read-writeThesuffixdisplayedfollowingtheareaunit.

Remarks

Thedefaultvalueis"Sq.Ft."or"m2",dependingonthevalueoftheMeasurementUnitproperty.Thevaluemustbenolongerthan255charactersinlength.

BasePointPropertyGetsandsetsthebasepointforthedrawingasanXYZ.

SeeAlso|Example

Signature

object.BasePoint

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

BasePointVariant(3elementarrayofdoubles);read-writeThebasepointinWCSX,Y,Z.

Remarks

SetthisvaluetoindicatetheWCSX,Y,ZthatcorrespondstothevalueoftheBasePointNEproperty.InthedefaultcoordinatesystemX,Yis0,0andtheNorthing/Eastingis0,0.

BasePointNEPropertyGetsandsetsthebasepointforthedrawingasanENZ.

SeeAlso|Example

Signature

object.BasePointNE

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

BasePointNEVariant(3elementarrayofdoubles);read-writeThebasepointinWCSX,Y,Z.

Remarks

SetthisvaluetoindicatetheEasting,NorthingandelevationthatcorrespondstothevalueoftheBasePointproperty.Inthedefaultcoordinatesystem,X,Yis0,0andtheNorthing/Eastingis0,0.

BayAnglePropertySpecifiesthebayangleofthelayoutgrid.

SeeAlso|Example

Signature

object.BayAngle

objectAecLayoutGrid2DTheobjectthispropertyappliesto.

BayAngleACAD_ANGLE;read-writeThebayangleofthelayoutgrid.

BlockPropertyGetsorsetstheAcadBlockfortheview.

SeeAlso|Example

Signature

object.Block

objectAecViewBlockDefTheobjectthispropertyappliesto.

BlockAcadBlock;read-write

BlockBasedLayerOffBehaviorPropertyImmediateandindependentlayeron/offcontrolofdisplaycomponents.

SeeAlso|Example

Signature

object.BlockBasedLayerOffBehavior

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

BlockBasedLayerOffBehaviorBoolean;read-writeImmediateandindependentlayeron/offcontrolofdisplaycomponents.

BlocksPropertyGetstheBlockscollectionforthedrawing.

SeeAlso|Example

Signature

object.Blocks

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

BlocksBlockscollection;read-onlyTheBlockscollectionforthedrawing.

BottomOffsetPropertySpecifiesthebottomoffsetoftheanchoredobject.

SeeAlso|Example

Signature

object.BottomOffset

objectAecAnchorEntToGridAssemblyTheanchorobjectthispropertyappliesto.

BottomOffsetDouble;read-writeThebottomoffsetoftheanchoredobject.(SeeRemarks.)

Remarks

TochangetheBottomOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingBottomOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

BoundaryPropertySpecifiestheboundaryobjectattachedtothegrid.

SeeAlso|Example

Signature

object.Boundary

objectAecLayoutGrid2DTheobjectthispropertyappliesto.

BoundaryAcadEntity;read-writeTheboundaryobjectattachedtothegrid.

BoundsPropertyGetstheupperleftandlowerrightcornersoftheprofile.

SeeAlso|Example

Signature

object.Bounds

objectAecProfileTheobjectthispropertyappliesto.

BoundsVariant(arrayof4doubles);read-onlyTopleft/Bottomrightcornerofprofile.

ByMaterialPropertySpecifiesifthedisplaypropertiesaredeterminedbythematerialassignedtothedisplaycomponent.

SeeAlso|Example

Signature

object.ByMaterial

objectAecDisplayComponentEntityTheobjectthispropertyappliesto.

ByMaterialBoolean;read-write

CellPropertySpecifiesthegridcelltoanchortheentityto.

SeeAlso|Example

Signature

object.Cell

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

CellLong;read-writeTheindexofthegridcelltheobjectisanchoredto.

CenterOnNodePropertySpecifiesiftheanchoredobjectiscenteredonthelayoutnode.

SeeAlso|Example

Signature

object.CenterOnNode

objectAecAnchorEntToLayoutVolume,AecAnchorLeadEntToNode,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutCellTheobjectthispropertyappliesto.

CenterOnNodeBoolean;read-writeTRUE:Centeronnode.FALSE:Don'tcenteronnode.

CentroidPropertyGetsthecenterofareaormassforaprofileshape.

SeeAlso|Example

Signature

object.Centroid

objectAecProfileTheobjectthispropertyappliesto.

CentroidVariant(two-elementarrayofdoubles);read-onlyCentroidpointoftheprofile.

ClassNamePropertyTheclassnameoftheobject.

SeeAlso|Example

Signature

object.ClassName

objectAecDisplayRepresentationTheobjectthispropertyappliesto.

ClassNameString;read-write

ClipVolPropertySpecifiestheclipvolumeofthe2dsection.

SeeAlso|Example

Signature

object.ClipVol

objectAec2dSectionTheobjectthispropertyappliesto.

ClipVolAecClipVol;read-write

ContourLinesPerSurfaceProperty

Specifiesthenumberofcontourlines(isolines)persurfaceonobjects.

SeeAlso|Example

Signature

object.ContourLinesPerSurface

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ContourLinesPerSurfaceInteger;read-writeThevalidrangeis0to2047.

Systemvariables

ThevalueofthispropertyisstoredintheISOLINESsystemvariable.

Remarks

Theinitialvalueforthispropertyis4.

AtoruswithContourLinesPerSurfacesetto4

AtoruswithContourLinesPerSurfacesetto20

CoordinatePrecisionPropertySpecifiestheprecisiontowhichcoordinatemeasurementsaredisplayed.

SeeAlso|Example

Signature

object.CoordinatePrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

CoordinatePrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.

Remarks

ThisisusedtodisplayallNorthing/Eastingcoordinateinformation.

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.

CoordinatesPropertyReturnstheverticesofaringorprofile.

SeeAlso|Example

Signature

object.Coordinates

objectAecRing,AecProfileTheobjectthispropertyappliesto.

CoordinatesVariant(n-elementarrayofdoubles);read-onlyListof2Dpoints.Theverticesofthisringorprofile.

CountPropertyGetsthenumberofitemsinacollection,orthenumberofnodesinalayoutcurve.

SeeAlso|Example

Signature

object.Count

objectAllCollections,AecLayoutCurve,AecDisplayRepresentations,AecDisplayComponents,AecMVBlockDisplayRepDefs,AecViewBlockDefs,AecsConnectionNodesTheobjectthispropertyappliesto.

CountLong;read-onlyThenumberofitems.

CreateDimscaleOverridePropertyAutomaticallycreateadimscaleoverride.

SeeAlso|Example

Signature

object.CreateDimscaleOverride

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

CreateDimscaleOverrideBoolean;read-writeAutomaticallycreateadimscaleoverride.

CutPlaneDisplayAbovePropertyGetsorsetstheupperrangeabovethecutplanetodisplayobjects.

SeeAlso|Example

Signature

object.CutPlaneDisplayAbove

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

CutPlaneDisplayAboveDouble;read-write

CutPlaneDisplayBelowPropertyGetsorsetsthelowerrangebelowthecutplanetodisplayobjects.

SeeAlso|Example

Signature

object.CutPlaneDisplayBelow

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

CutPlaneDisplayBelowDouble;read-write

CutPlaneHeightPropertyGetsorsetstheheightofthecutplane.

SeeAlso|Example

Signature

object.CutPlaneHeight

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

CutPlaneHeightDouble;read-write

CutProfilePropertyReturnsthecutprofilefortheobject.

SeeAlso|Example

Signature

object.CutProfile

objectAecMaskBlockRefTheobjectthispropertyappliesto.

CutProfileAecProfile;read-only

DatabasePropertyGetsthedatabaseinwhichtheobjectbelongs.

SeeAlso|Example

Signature

object.Database

objectAecBaseDatabasePreferences,AecMassGroupsTheobjectorobjectsthispropertyappliesto.

DatabaseAcadDatabaseobject;read-onlyTheDatabaseobjectthatcontainstheobject.

DatabaseScalePropertySpecifiesthedatabasescaleatwhichthehorizontalaxisofthedrawingisdisplayed.

SeeAlso|Example

Signature

object.DatabaseScale

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

DatabaseScaleDouble;read-writeThedatabase(horizontal)scale.Forexample,fora1:200scale,type200.

Remarks

Thedatabase(horizontal)scalecontrolsthesizeofannotationplacedinthedrawing,includingtext,scaledblocksandspeciallines.Itdoesnotaffectthelinelengthsorpointcoordinatesbecausetheyarealwaysdefinedinrealworldcoordinates,nottoanyscale.Neitherdoesitaffectanydesigndatainthedrawingorprojectfiles.

IfyouchangetheDatabaseScalepropertyinthemiddleofadrawingsession,thenanyannotationaddedsubsequentlyisscaledaccordingly.

DepthPropertyGetsorsetsthesizeofthegridormasselementinitsrelativeYdirection.

SeeAlso|Example

Signature

object.Depth

objectAecLayoutGrid2D,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.

DepthDouble;read-writeThesizeoftheobjectinitsrelativeYdirection;seeRemarks.

Remarks

Forradial2Dlayoutgrids,Depthisanangle,inradians.

DefaultDisplayPropertiesPropertyThecollectionofdefaultdisplaypropertiesforthedisplayrepresentation.

SeeAlso|Example

Signature

object.DefaultDisplayProperties

objectAecDisplayRepresentationTheobjectthispropertyappliesto.

DefaultDisplayPropertiesAecDisplayProperties;read-write

DescriptionPropertyGetsorsetstextdescribingtheAECObject.

SeeAlso|Example

Signature

object.Description

objectAecAnchorExtendedTagToEntAecObjectTheobjectthispropertyappliesto.

DescriptionString;read-writeDescriptionoftheAECObject.

DeviationPropertySpecifiesthedeviationofthemasselement.

SeeAlso|Example

Signature

object.Deviation

objectAecMassElementTheobjectthispropertyappliesto.

DeviationDouble;read-write

DictionariesPropertyGetstheDictionariescollectionforthedocument.

SeeAlso|Example

Signature

object.Dictionaries

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

DictionariesDictionariescollection;read-onlyTheDictionariescollectionforthedocument.

DimStylesPropertyGetstheDimStylescollectionforthedocument.

SeeAlso|Example

Signature

object.DimStyles

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

DimStylesAcadDimStylescollection;read-onlyTheDimStylescollectionforthedocument.

DisplayComponentsPropertyGetsthecollectionofdisplaycomponentsforthedisplayrepresentation.

SeeAlso|Example

Signature

object.DisplayComponents

objectAecDisplayPropertiesTheobjectthispropertyappliesto.

DisplayComponentsAecDisplayComponents;read-write

Remarks

ThedisplaycomponentscollectioncontainsAecDisplayComponentEntityandAecDisplayComponentHatchobjects.

DisplayConfigurationsPropertyReturnsthedisplayconfigurationscollection.

SeeAlso|Example

Signature

object.DisplayConfigurations

objectAecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.

DisplayConfigurationsAecDisplayConfigurations;read-write

DisplayHiddenLineworkPropertySpecifieswhetherhiddenlineworkisdisplayed.

SeeAlso|Example

Signature

object.DisplayHiddenLinework

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

DisplayHiddenLineworkBoolean;read-write

DisplayNamePropertyThenamedisplayedfortheobject.

SeeAlso|Example

Signature

object.DisplayName

objectAecDisplayRepresentation,AecMVBlockDisplayRepDefTheobjectthispropertyappliesto.

DisplayNameString;read-write

DisplayRepDefsPropertyReturnsthedisplayrepresentationdefinitionsforthemulti-viewblockstyle.

SeeAlso|Example

Signature

object.DisplayRepDefs

objectAecMVBlockStyleTheobjectthispropertyappliesto.

MVBlockDisplayRepDefsAecMVBlockDisplayRepDefs;read-write

DisplayRepresentationsPropertyGetsthedisplayrepresentationscollection.

SeeAlso|Example

Signature

object.DisplayRepresentations

objectAecDisplaySet,AecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.

DisplayRepresentationsAecDisplayRepresentations;read-write

Remarks

YoucanappendtoorremovefromtheDisplayRepresentationscollectionwhenaccessedfromtheDisplaySet.

DisplaySetPropertyGetsorsetsthethedisplaysetforagivenviewdirection.

SeeAlso|Example

Signature

RetVal=object.DisplaySet(ViewDir)

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

ViewDirAecViewDirection;input-onlyTheviewdirection.

RetValAecDisplaySetThedisplaysetthatappliesusedfortheviewdirection.

DisplaySetsPropertyReturnsthecollectionofdisplaysets.

SeeAlso|Example

Signature

object.DisplaySets

objectAecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.

DisplaySetsAecDisplaySets;read-write

DisplaySilhouettePropertyControlsifsilhouettecurvesofsolidobjectsaredisplayedinWireframemode.

SeeAlso|Example

Signature

object.DisplaySilhouette

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

DisplaySilhouetteBoolean;read-write

TRUE:Displayonlysilhouettelinesforsolidobjects.

FALSE:Displayisolinesforsolidobjects.

Systemvariables

ThevalueofthispropertyisstoredintheDISPSILHsystemvariable.

Remarks

TheinitialvalueforthispropertyisFALSE.

DocumentPropertyGetsthedocument(drawing)inwhichtheobjectbelongs.

SeeAlso|Example

Signature

object.Document

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

DocumentDocumentobject;read-onlyThedocument(drawing)thatcontainstheobject.

DoubleHatchPropertySpecifiesifdoublehatchingisused.

SeeAlso|Example

Signature

object.DoubleHatch

objectAecDisplayComponentHatchTheobjectthispropertyappliesto.

DoubleHatchBoolean;read-write

Remarks

TheDoubleHatchpropertyapplieswhentheHatchTypeissettoaecHatchTypeUserDefined.

EdgeWidthPropertySpecifiestheedgewidthofthepolygonstyle.

SeeAlso|Example

Signature

object.EdgeWidth

objectAecPolygonStyleTheobjectthispropertyappliesto.

EdgeWidthDouble;read-writeTheedgewidthofthepolygonstyle.

EdgeWidthJustifyPropertySpecifieswhetheredgesaredisplayedinside,outside,orcenteredontheAECPolygonvertices.

SeeAlso|Example

Signature

object.EdgeWidthJustify

objectAecPolygonStyleTheobjectthispropertyappliesto.

EdgeWidthJustifyAecPolygonStyleEdgeWidthJustificationenum;read-writeTheedgejustificationofthepolygonstyle.

ElevationModelSpacePropertySpecifiestheelevationsettinginthemodelspace.

SeeAlso|Example

Signature

object.ElevationModelSpace

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

ElevationModelSpaceDouble;read-writeTheelevationsettingformodelspace.

Remarks

ThecurrentelevationistheZvaluethatisusedwhenevera3DpointisexpectedbutonlytheXandYvaluesaresupplied.Thecurrentelevationismaintainedseparatelyinmodelspaceandpaperspace.

ElevationPaperSpacePropertySpecifiestheelevationsettinginthepaperspace.

SeeAlso|Example

Signature

object.ElevationPaperSpace

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

ElevationPaperSpaceDouble;read-writeTheelevationforpaperspace.

Remarks

ThecurrentelevationistheZvaluethatisusedwhenevera3DpointisexpectedbutonlytheXandYvaluesaresupplied.Thecurrentelevationismaintainedseparatelyinmodelspaceandpaperspace.

ElevationPrecisionPropertySpecifiestheprecisiontowhichelevationmeasurementsaredisplayedinthedrawing.

SeeAlso|Example

Signature

object.ElevationPrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

ElevationPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.

Remarks

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.

EndOffsetPropertySpecifiestheoffsetdistancefromtheendpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.

SeeAlso|Example

Signature

object.EndOffset

objectAecLayoutCurveTheobjectthispropertyappliesto.

EndOffsetDouble;read-writeOffsetdistancefromendpointofthecurve.

ExcludeFrom2dSectionShrinkwrapPropertySpecifieswhetherthematerialisexcludedfromtheshrinkwrapofa2Dsection.

SeeAlso|Example

Signature

object.ExcludeFrom2dSectionShrinkwrap

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

ExcludeFrom2dSectionShrinkwrapBoolean;read-write

FacetDeviationPropertySpecifiesthealloweddeviationwhenfacettingcurvedlinesandsurfaces.

SeeAlso|Example

Signature

object.FacetDeviation

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

FacetDeviationDouble;read-writeThefacetdeviationofAEC3DObjects.

Systemvariables

ThevalueofthispropertyisstoredintheFACETDEVsystemvariable.

Remarks

FacetdeviationissimilartoFacetResforACISbodies.

FacetMaximumPropertySpecifiesthemaximumnumberoffacetsusedforacircle.

SeeAlso|Example

Signature

object.FacetMaximum

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

FacetMaximumInteger;read-writeThemaximumnumberoffacetsusedforacircle.

FixedViewDirectionPropertyGetsorsetsafixedviewdirectionforadisplayconfiguration.

SeeAlso|Example

Signature

object.FixedViewDirection

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

FixedViewDirectionAecFixedViewDirection;read-write

FlipXPropertyDeterminesiftheanchoredobjectisflippedabouttheXaxisofthecurveitisanchoredto.

SeeAlso|Example

Signature

object.FlipX

objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

FlipXBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheXaxis.FALSE:AnchoredobjectisnotflippedaroundtheXaxis.

FlipYPropertyDeterminesiftheanchoredobjectisflippedabouttheYaxisofthecurveitisanchoredto.

SeeAlso|Example

Signature

object.FlipY

objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

FlipYBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheYaxis.FALSE:AnchoredobjectisnotflippedaroundtheYaxis.

FlipZPropertyDeterminesiftheanchoredobjectisflippedabouttheZaxisofthecurveitisanchoredto.

SeeAlso|Example

Signature

object.FlipZ

objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

FlipZBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheZaxis.FALSE:AnchoredobjectisnotflippedaroundtheZaxis.

GroupsPropertyGetstheGroupscollectionforthedocument.

SeeAlso|Example

Signature

object.Groups

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

GroupsAcadGroupscollection;read-onlyTheGroupscollectionforthedocument.

HandlePropertyGetsthehandleofanobject.

SeeAlso|Example

Signature

object.Handle

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

HandleString;read-onlyThehandleoftheentity.

Remarks

AnobjectIDandauniquehandlearethetwowaysofreferencinganobject.Ahandleispersistent(staysthesame)inadrawingforthelifetimeoftheobject.

Ingeneral,useahandleunlessyouplantoworkwithcertainObjectARXfunctionsthatrequireanobjectID.

HasExtensionDictionaryPropertyDeterminesiftheobjecthasanextensiondictionaryassociatedwithit.

SeeAlso|Example

Signature

object.HasExtensionDictionary

ObjectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

HasExtensionDictionaryBoolean;read-only

TRUE:Theobjecthasanextensiondictionaryassociated

withit.

FALSE:Theobjectdoesnothaveanextensiondictionaryassociatedwithit.

Remarks

Youcancreateanextensiondictionaryforanobject,orqueryanexistingextensiondictionarybyusingtheGetExtensionDictionarymethod.

HatchTypePropertyGetsorsetsthehatchtypeforthedisplaycomponent.

SeeAlso|Example

Signature

object.HatchType

objectAecDisplayComponentHatchTheobjectthispropertyappliesto.

HatchTypeAecHatchType;read-write

HeightPropertySpecifiestheheightoftheobject.

SeeAlso|Example

Signature

object.Height

objectAecClipVol,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.

HeightDouble;read-writeTherelativeheightoftheobject.

HyperlinksPropertyGetstheHyperlinkscollectionforanentity.

SeeAlso|Example

Signature

object.Hyperlinks

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

HyperlinksAcadHyperlinks;read-onlyTheHyperlinkscollectionfortheentity.

IndexPropertyReturnsthepositionoftheitemwithinitscollection.

SeeAlso|Example

Signature

object.Index

objectAecRingAecLayerOverrideSetting,AecLayoutCurveNode,AecLayoutGrid2DNode,AecLayoutGrid2DXNode,AecLayoutGrid2DYNode,AecLayoutGrid3DNode,AecLayoutGrid3DXNode,AecLayoutGrid3DYNode,AecLayoutGrid3DZNode,AecViewBlock,AecLayerKey,AecDisplayComponent,AecMVBlockDisplayRepDef,AecViewBlockDef,AecsConnectionNodeTheobjectthispropertyappliesto.

IndexLong,exceptforAecLayerOverrideSetting,whichisaString;read-onlyThepositionoftheobjectwithinitscollection.

Remarks

AecLayerOverrideSettingisindexedrandomly,byname.

InsertionPointPropertySpecifiestheinsertionpointoftheprofile.

SeeAlso|Example

Signature

object.InsertionPoint

objectAecEditInPlaceProfileTheobjectthispropertyappliesto.

InsertionPointVariant(three-elementarrayofdoubles);read-writeTheinsertionpointoftheprofile.

InsideRadiusPropertySpecifiestheinsideradiusofthelayoutgrid.

SeeAlso|Example

Signature

object.InsideRadius

objectAecLayoutGrid2DTheobjectthispropertyappliesto.

InsideRadiusDouble;read-writeTheinsideradiusofthelayoutgrid.

InterferenceBlockNamePropertySpecifiesthenameoftheinterferenceblockfortheMulti-viewblock.

SeeAlso|Example

Signature

object.InterferenceBlockName

objectAecMVBlockStyleTheobjectthispropertyappliesto.

InterferenceBlockNameString;read-write

KeysPropertyReturnsthecollectionoflayerkeysinalayerkeystyle.

SeeAlso|Example

Signature

object.Keys

objectAecLayerKeyStyleTheobjectthispropertyappliesto.

KeysAecLayerKeys;read-onlyReturnsthecollectionofAecLayerKeys.

LayerPropertySpecifiesthelayertheobjectison.

SeeAlso|Example

Signature

object.Layer

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKey,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

LayerString;read-writeThenameoftheobject'slayer.

LayerFilePropertySpecifiesthenameofthefilecontainingdefaultlayerstandardandkeystyledefinitions.

SeeAlso|Example

Signature

object.LayerFile

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

LayerFileString;read-writeThenameofthelayerfile.

Remarks

Thelayerfileisstoredasaglobalsettingintheregistry,andnotonaper-drawingbasis.AnentryismaintainedforeachMeasurementUnit.

LayerKeyStylePropertySpecifiesthelayerkeystylefortheobject.

SeeAlso|Example

Signature

object.LayerKeyStyle

objectAecLayerKey,AecLayerKeys,AecLayerOverrideSetting,AecLayerOverrideSettingsTheobjectthispropertyappliesto.

LayerKeyStyleAecLayerKeyStyle;read-writeLayerkeystyleoftheobject.

LayersPropertyGetstheLayerscollectionforthedocument.

SeeAlso|Example

Signature

object.Layers

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

LayersAcadLayerscollection;read-onlyTheLayerscollectionforthedocument.

LayerStandardPropertyThelayerstandardtoapplytothedrawing.

SeeAlso|Example

Signature

object.LayerStandard

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

LayerStandardString;read-writeThenameofthelayerstandard.

Remarks

Thelayerstandardsarestoredonaperdrawingbasisinthedictionary.

LayoutCurvePropertyProvidesaccesstolayoutcurvegeometry.

SeeAlso|Example

Signature

object.LayoutCurve

objectAecLayoutCurveNode,AecLayoutCurveNodesTheobjectthispropertyappliesto.

LayoutCurveAecLayoutCurve;read-writeAlayoutcurveobject.

LayoutGrid2DPropertyIdentifiesthe2Dlayoutgridthatownstheobject.

SeeAlso|Example

Signature

object.LayoutGrid2D

objectAecLayoutGrid2DNode,AecLayoutGrid2DNodes,AecLayoutGrid2DXNode,AecLayoutGrid2DXNodes,AecLayoutGrid2DYNode,AecLayoutGrid2DYNodesTheobjectthispropertyappliesto.

LayoutGrid2DAecLayoutGrid2D;read-writeThelayoutgridthatownsthelayoutgridnodeorcollectionofnodes.

LayoutGrid3DPropertyIdentifiesthe3Dlayoutgridthatownstheobject.

SeeAlso|Example

Signature

object.LayoutGrid3D

objectAecLayoutGrid3DNode,AecLayoutGrid3DNodes,AecLayoutGrid3DXNode,AecLayoutGrid3DXNodes,AecLayoutGrid3DYNode,AecLayoutGrid3DYNodes,AecLayoutGrid3DZNode,AecLayoutGrid3DZNodesTheobjectthispropertyappliesto.

LayoutGrid3DAecLayoutGrid3D;read-writeThe3Dlayoutgridthatownsthelayoutgridnodeorcollectionofnodes.

LayoutsPropertyGetstheLayoutscollectionforthedocument.

SeeAlso|Example

Signature

object.Layouts

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

LayoutsAcadLayoutsobject;read-onlyTheLayoutscollectionforthedocument.

LeaderExtension1PropertySpecifiesthefirstleaderextension.

SeeAlso|Example

Signature

object.LeaderExtension1

objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

LeaderExtension1Double;read-writeThefirstleaderextension.

LeaderExtension2PropertySpecifiesthesecondleaderextension.

SeeAlso|Example

Signature

object.LeaderExtension2

objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

LeaderExtension2Double;read-writeThesecondleaderextension.

LeftOffsetPropertySpecifiestheleftoffsetfortheanchoredobject.

SeeAlso|Example

Signature

object.LeftOffset

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

LeftOffsetDouble;read-writeTheleftoffsetfortheanchoredobject.(SeeRemarks.)

Remarks

TochangetheLeftOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingLeftOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

LimitsPropertySpecifiesthedrawinglimits.

SeeAlso|Example

Signature

object.Limits

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

LimitsVariant(arrayofdoubles);read-writeAnarrayoffourvalues.ThefirstpairofvaluesdefinetheXandYcoordinatesofthelower-leftlimit,thesecondpairofvaluesdefinetheXandYcoordinatesoftheupper-rightlimit.

Systemvariables

Thelower-leftlimitcontrolstheLIMMINsystemvariable.Theupper-rightlimitcontrolstheLIMMAXsystemvariable.TheLIMCHECKsystemvariableturnslimitscheckingonandoffforthecurrentspace.

Remarks

Thedrawinglimitsaretwo-dimensionalpointsintheWorldCoordinateSystem(WCS)thatrepresentalower-leftandanupper-rightlimit.YoucannotimposelimitsontheZdirection.

ThedrawinglimitsalsogoverntheportionofthedrawingcoveredbythevisiblegridanddeterminetheminimumareathattheZoomAllmethoddisplays.

LinearDisplayFormatProperty

Specifiestheformatusedtodisplaylinearmeasurementvalues.

SeeAlso|Example

Signature

object.LinearDisplayFormat

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

LinearDisplayFormatLong;read-writeTheformatusedtodisplaylinearmeasurementvalues.Canbeoneofthefollowing:

1: Scientific

2: Decimal

3: Engineering

4: Architectural

5: Fractional

LinearPrecisionPropertySpecifiesthelinearprecisionforthedrawing.

SeeAlso|Example

Signature

object.LinearPrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

LinearPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.

Remarks

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.

LinearUnitPropertySpecifiestheunitusedtodisplaylinearvalues.

SeeAlso|Example

Signature

object.LinearUnit

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

LinearUnitsAecBuiltInUnitenum;read-writeTheunitusedtodisplaylinearvalues.Specifyoneofthefollowing:

aecUnitInch: Inches

aecUnitFoot: Feet

aecUnitMillimeter: Millimeters

aecUnitCentimeter: Centimeters

aecUnitDecimeter: Decimeters

aecUnitMeter: Meters

Remarks

Usethispropertytospecifywhetheryouwanttousefeetormetersinyourdrawing.

Thelinearunitsthatyouselectmustbethesameforalldrawingsinaproject.Youcannotmixfoot-baseddrawingswithmeter-baseddrawingsinthesameproject.

LinetypePropertySpecifiesthelinetypeoftheobject.

SeeAlso|Example

Signature

object.Linetype

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKey,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

LinetypeString;read-writeThenameofthelinetypeoftheobject.

LinetypesPropertyGetstheLinetypescollectionforthedocument.

SeeAlso|Example

Signature

object.Linetypes

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

LinetypesAcadLineTypescollection;read-onlyTheLinetypescollectionforthedocument.

LinetypeScaleProperty

Specifiesthelinetypescaleofanentity.

SeeAlso|Example

Signature

object.LinetypeScale

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

LinetypeScaleDouble;read-writeThisvaluemustbeapositiverealnumber.Thedefaultis1.0.

Remarks

Thelinetypescaleofanobjectspecifiestherelativelengthofdash-dotlinetypesperdrawingunit.

Linetypescale=1.0

Linetypescale=0.5

Linetypescale=0.25

LineWeightPropertySpecifiesthelineweightoftheobject.

SeeAlso|Example

Signature

object.LineWeight

objectAecBaseDatabasePreferences,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDatabasePreferences,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKey,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

LineWeightAcLineWeightorACAD_LWEIGHTenum;read-writeLineweightoftheobject.

LineweightDisplayPropertySpecifieswhetherlineweightsaredisplayedinmodelspaceforthedrawing.

SeeAlso|Example

Signature

object.LineweightDisplay

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

LineweightDisplayBoolean;read-write

TRUE:Lineweightsaredisplayedinmodelspace.

FALSE:Lineweightsarenotdisplayedinmodelspace.

Remarks

TheinitialvalueforthispropertyisTRUE.

Regenerationtimeincreaseswithlineweightsthatarerepresentedbymorethanonepixel.SetthispropertytoFALSEifperformanceslowsdownwhenworkingwithlargelineweights.

LocationPropertySpecifiestheinsertionpositionoftheobject.

SeeAlso|Example

Signature

object.Location

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

LocationVariant(three-elementarrayofdoubles);read-writeInsertionpositionoftheobject.

LowerExtensionPropertySpecifiesthedistanceofthelowercutplanebelowtheclipvolumeposition.

SeeAlso|Example

Signature

object.LowerExtension

objectAecClipVolTheobjectthispropertyappliesto.

LowerExtensionDouble;read-writeDistanceofthelowercutplanebelowclipvolumeposition.

MassElementStylesPropertyReturnsthecollectionofmasselementstylesinthespecifieddrawingdatabase.

SeeAlso|Example

Signature

object.MassElementStyles

objectAecBaseDatabaseTheobjectthispropertyappliesto.

MassElementStylesAecMassElementStyles;read-writeThecollectionofmasselementstyles.

MassGroupPropertyGetsorsetstheparentmassgroupofamasselementormassgroup.

SeeAlso|Example

Signature

object.MassGroup

objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.

MassGroupAecMassGroup;read-writeTheparentmassgroup,ifany.

MassGroupNamePropertySpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.

SeeAlso|Example

Signature

object.MassGroupName

objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.

MassGroupNameString;read-writeSpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.

MaxActiveViewportsPropertySpecifiesthemaximumnumberofactiveviewports.

SeeAlso|Example

Signature

object.MaxActiveViewports

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

MaxActiveViewportsInteger;read-writeThemaximumnumberofactiveviewports.2<=MaxActiveViewports<=48

Systemvariables

ThevalueofthispropertyisstoredintheMAXACTVPsystemvariable.

Remarks

Inactiveviewportsareblank,sotheircontentsarenotregenerated.Youcan,therefore,improveperformancebyspecifyingalowvalue.Theinitialvalueis48.

MeasurementUnitProperty

Identifiesthesystemofunitsusedtodisplaymeasurementsinthedrawing.

SeeAlso|Example

Signature

object.MeasurementUnit

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

MeasurementUnitAcMeasurementUnitenum;read-onlyThesystemofunitsusedtodisplaymeasurements.Canbeoneofthefollowing:

acEnglish: English(Imperial)units

acMetric: Metricunits

MergeCommonMaterialsPropertySpecifieswhethercommonmaterialsaremergedintoonecomponent.

SeeAlso|Example

Signature

object.MergeCommonMaterials

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

MergeCommonMaterialsBoolean;read-write

ModelSpacePropertyGetstheModelSpacecollectionforthedocument.

SeeAlso|Example

Signature

object.ModelSpace

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

ModelSpaceAcadModelSpacecollection;read-onlyTheModelSpacecollectionforthedocument.

MVBlockRefPropertyGetsorsetsamulti-viewblockreferenceforaviewblockorcollectionofviewblocks.

SeeAlso|Example

Signature

object.MVBlockRef

objectAecViewBlock,AecViewBlocksTheobjectthispropertyappliesto.

MVBlockRefAecMVBlockRef;read-writeReferenceofamulti-viewblockinsertedintoadrawing.

NamePropertyReturnsthenameoftheobject.

SeeAlso|Example

Signature

object.Name

objectAecCamera,AecDictRecord,AecLayerKey,AecLayerKeyStyle,AecLayerOverrideSetting,AecMaskBlockStyle,AecMassGroup,AecMVBlockStyle,AecPolygonStyle,AecProfileStyle,AecViewBlock,AecDisplayComponentTheobjectthispropertyappliesto.

NameString;read-onlyforallobjectsexceptAecCamera.Thenameoftheobject.

NodePropertySpecifiesthelayoutnodetheanchorattachesanobjectto.

SeeAlso|Example

Signature

object.Node

objectAecAnchorEntToLayoutNode,AecAnchorLeadEntToNode,AecAnchorEntToLayoutVolume,AecAnchorEntToLayoutCellTheanchorobjectthispropertyappliesto.

NodeLong;read-writeNodeentityisanchoredto.Thefirstnodeonthegridis1.

NodesPropertyReturnsthecollectionofnodesonthelayoutcurve.

SeeAlso|Example

Signature

object.Nodes

objectAecLayoutCurveTheobjectthispropertyappliesto.

NodesAecLayoutNodes;read-onlyThecollectionofnodesonthecurve.

NorthRotationPropertySpecifiestheanglealignedtonorthwithinadrawing.

SeeAlso|Example

Signature

object.NorthRotation

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

NorthRotationDouble;read-writeThenorthrotationangle.Theangleisinradiansandmeasuredcounter-clockwisefromtheXaxis(East).

Remarks

Theinitialvalueforthispropertyis0.

IfyouchangetheNorthRotationinanexistingdrawingthenyoumustmoveanyobjectsinthedrawingtomatchthenewcoordinatesystem.

ObjectIDPropertyGetstheobjectIDoftheobject.

SeeAlso|Example

Signature

object.ObjectID

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

ObjectIDLong;read-onlyTheobjectIDofanentity.

Remarks

AnobjectIDandauniquehandlearebothwaysofreferencinganobject.

Ingeneral,useahandleunlessyouplantoworkwithcertainObjectARXfunctionsthatrequireanobjectID.

ObjectNamePropertyGetstheAutoCADclassnameoftheobject.

SeeAlso|Example

Signature

object.ObjectName

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

ObjectNameString;read-onlyTheAutoCADclassnameofanentity.

ObjectSortByPlottingPropertyTogglessortingofdrawingobjectsbyplottingorder.

SeeAlso|Example

Signature

object.ObjectSortByPlotting

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortByPlottingBoolean;read-write

TRUE:Enablesortbyplottingorder.

FALSE:Disablesortbyplottingorder.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisTRUE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

ObjectSortByPSOutputPropertyTogglessortingofdrawingobjectsbyPostScriptoutputorder.

SeeAlso|Example

Signature

object.ObjectSortByPSOutput

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortByPSOutputBoolean;read-write

TRUE:EnablesortbyPostScriptoutputorder.

FALSE:DisablesortbyPostScriptoutputorder.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisTRUE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

ObjectSortByRedrawsPropertyTogglessortingofdrawingobjectsbyredraworder.

SeeAlso|Example

Signature

object.ObjectSortByRedraws

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortByRedrawsBoolean;read-write

TRUE:Enablesortbyredraworder.

FALSE:Disablesortbyredraworder.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisFALSE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

ObjectSortByRegensPropertyTogglessortingofdrawingobjectsbyregenerationorder.

SeeAlso|Example

Signature

object.ObjectSortByRegens

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortByRegensBoolean;read-write

TRUE:Enablesortbyregenerationorder.

FALSE:Disablesortbyregenerationorder.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisFALSE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

ObjectSortBySelectionPropertyTogglessortingofdrawingobjectsbyobjectselection.

SeeAlso|Example

Signature

object.ObjectSortBySelection

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortBySelectionBoolean;read-write

TRUE:Enablesortbyobjectselection.

FALSE:Disablesortbyobjectselection.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisFALSE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

ObjectSortBySnapPropertyTogglessortingofdrawingobjectsbyobjectsnap.

SeeAlso|Example

Signature

object.ObjectSortBySnap

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

ObjectSortBySnapBoolean;read-write

TRUE:Enablesortbyobjectsnap.

FALSE:Disablesortbyobjectsnap.

Systemvariables

ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.

Remarks

TheinitialvalueofthispropertyisFALSE.

Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.

OffsetPropertySpecifiestheoffsetfromtheobject.

SeeAlso|Example

Signature

object.Offset

objectAecAnchorLeadEntToNode,AecAnchorEntTolayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecEntRefTheobjectthispropertyappliesto.

OffsetVariant;read-writeOffsetfromthelayoutnodeorentityreference.

OLELaunchPropertyDetermineswhethertolaunchtheparentapplicationwhenplottingOLEobjects.

SeeAlso|Example

Signature

object.OLELaunch

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

OLELaunchBoolean;read-write

TRUE:TheparentapplicationofanOLEobjectislaunchedtoprintit.

FALSE:TheOLEobjectisprintedfromthecurrentapplication.

Systemvariables

ThevalueofthispropertyisstoredintheOLESTARTUPsystemvariable.

Remarks

TheinitialvalueofthispropertyisFALSE.

Plottingfromtheparentapplicationachievesahigherqualityplot;however,thespeedoftheplotisdecreased.

OperationPropertySpecifieshowobjectsarecombined.

SeeAlso|Example

Signature

object.Operation

objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.

OperationAecMassOperationenum;read-writeBooleanoperation:addition,subtraction,orintersection.

OverrideDisplayPropertiesPropertyThecollectionofdisplaypropertyoverridesforthedisplayrepresentation.

SeeAlso|Example

Signature

object.OverrideDisplayPropertiesAecObject

objectAecDisplayRepresentationTheobjectthispropertyappliesto.

OverrideDisplayPropertiesAecDisplayProperties;read-write

AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.

Remarks

Overridescanbeappliedbyobjectorbystyle.

OverridesEnabledPropertySpecifieswhetherlayeroverridesareappliedtothestylewhenalayerisgeneratedfromakey.

SeeAlso|Example

Signature

object.OverridesEnabled

objectAecLayerKeyStyleTheobjectthispropertyappliesto.

OverridesEnabledBoolean;read-writeTRUE:Overridesareapplied.FALSE:Overridesarenotapplied.

OverrideSettingsPropertyReturnsthecollectionoflayerkeyoverridesettingsforalayerkeystyle.

SeeAlso|Example

Signature

object.OverrideSettings

objectAecLayerKeyStyleTheobjectthispropertyappliesto.

OverrideSettingsAecLayerOverrideSettings;read-onlyThecollectionoflayerkeyoverridesettings.

OwnerIDPropertyGetstheobjectIDoftheowner(parent)object.

SeeAlso|Example

Signature

object.OwnerID

objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

OwnerIDLong;read-onlyTheobjectIDofanobject'sowner.

PaperSpacePropertyGetsthePaperSpacecollectionforthedocument.

SeeAlso|Example

Signature

object.PaperSpace

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

PaperSpaceAcadPaperSpacecollection;read-onlyThePaperSpacecollectionforthedocument.

PatternNamePropertyGetsorsetsthenameofthecustomhatchpattern.

SeeAlso|Example

Signature

object.PatternName

objectAecDisplayComponentHatchTheobjectthispropertyappliesto.

PatternNameString;read-write

Remarks

ThePatternNameapplieswhentheHatchTypeissettoaecHatchTypeCustomDefined.

PerimeterPropertySpecifiestheperimeteroftheprofile.

SeeAlso|Example

Signature

object.Perimeter

objectAecProfileTheobjectthispropertyappliesto.

PerimeterDouble;read-only

PlaneDepthPropertySpecifiestheplanedepthoftheslice.

SeeAlso|Example

Signature

object.PlaneDepth

objectAecSliceTheobjectthispropertyappliesto.

PlaneDepthDouble;read-write

PlaneWidthPropertySpecifiestheplanewidthoftheslice.

SeeAlso|Example

Signature

object.PlaneWidth

objectAecSliceTheobjectthispropertyappliesto.

PlaneWidthDouble;read-write

PlotConfigurationsPropertyGetsthePlotConfigurationscollectionforthedocument.

SeeAlso|Example

Signature

object.PlotConfigurations

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

PlotConfigurationsAcadPlotConfigurationscollection;read-onlyThePlotConfigurationscollectionforthedocument.

PlotStyleNamePropertySpecifiestheplotstylenamefortheobject.

SeeAlso|Example

Signature

object.PlotStyleName

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKey,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

PlotStyleNameString;read-writeThenameoftheobject'splotstyle.

PlottablePropertySpecifieswhetherthelayergeneratedfromthekeyisplottable.

SeeAlso|Example

Signature

object.Plottable

objectAecLayerKeyTheobjectthispropertyappliesto.

PlottableBoolean;read-writeTRUE:LayerisplottableFALSE:Layerisnotplottable

PolygonStylesPropertyReturnsthecollectionofpolygonstylesinthespecifieddrawingdatabase.

SeeAlso|Example

Signature

object.PolygonStyles

objectAecBaseDatabaseTheobjectthispropertyappliesto.

PolygonStylesAecPolygonStyles;read-onlyThecollectionofpolygonstyles.

PreferencesPropertyReturnsthePreferencesobjectforthespecifieddrawing.

SeeAlso|Example

Signature

object.Preferences

objectAecBaseDatabase,AecDatabaseTheobjectthispropertyappliesto.

Preferences

AcadDatabasePreferences;read-onlyThePreferencesobjectforthedrawing.

ProfilePropertyReturnsorsetstheobject'sprofile.

SeeAlso|Example

Signature

object.Profile

objectAecEditInPlaceProfile,AecPolygon,AecProfileStyle,AecRing,AecRings,AecMassElement,AecSliceTheobjectthispropertyappliesto.

ProfileAecProfile;read-writeTheobject'sprofile.

ProfileStylePropertySpecifiestheprofilestyleofthemasselement.

SeeAlso|Example

Signature

object.ProfileStyle

objectAecMassElementTheobjectthispropertyappliesto.

ProfileStyleAecProfileStyle;read-writeTheprofilestyleofthemasselement.

ProfileStyleNamePropertySpecifiesthenameoftheobject'sprofilestyle.

SeeAlso|Example

Signature

object.ProfileStyleName

objectAecEditInPlaceProfile,AecMassElementTheobjectsthispropertyappliesto.

ProfileStyleNameString;read-writeThenameoftheprofilestyle.

ProjectNamePropertySpecifiesthenameoftheprojectthatthedrawingbelongsto.

SeeAlso|Example

Signature

object.ProjectName

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

ProjectNameString;read-writeTheprojectname.

Remarks

Theprojectnamecanbenomorethan255charactersinlength.

RadiusPropertySpecifiestheradiusofcurvedmasselements.

SeeAlso|Example

Signature

object.Radius

objectAecMassElementTheobjectthispropertyappliesto.

RadiusDouble;read-writeTheradiusofthemasselement.

ReferencePropertySpecifiestheobjectbeinganchoredto.

SeeAlso|Example

Signature

object.Reference

objectAecAnchorEntToLayoutCell,AecAnchorEntToCurve,AecAnchorLeadEntToNode,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorToRefTheobjectthispropertyappliesto.

ReferenceAcadEntity;read-write,exceptforAecAnchorEntToGridAssembly,whichisread-only.Theobjectbeinganchoredto.

RegisteredApplicationsPropertyGetstheRegisteredApplicationscollectionforthedocument.

SeeAlso|Example

Signature

object.RegisteredApplications

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

RegisteredApplicationsAcadRegisteredApplicationscollection;read-onlyTheRegisteredApplicationscollectionforthedocument.

RemoveablePropertySpecifieswhetheryoucanremovethelayerkeyfromthelayerkeystyle.

SeeAlso|Example

Signature

object.Removeable

objectAecLayerKeyTheobjectthispropertyappliesto.

RemoveableBoolean;read-onlyTRUE:Layerkeyisremovable.FALSE:Layerkeyisnotremovable.

RenderSmoothnessPropertySpecifiesthesmoothnessofshaded,rendered,andhiddenline-removedobjects.

SeeAlso|Example

Signature

object.RenderSmoothness

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

RenderSmoothnessDouble;read-writeThevalidrangeis0.01to10.0.

Systemvariables

ThevalueofthispropertyisstoredintheFACETRESsystemvariable.

Remarks

Theinitialvalueforthispropertyis0.5.Toimproveperformance,setthisvalueto1orlesswhendrawing.

ResizeOffsetPropertySpecifiestheoffsetoftheanchoredobjecttothecellboundarywhenthecellisresized.

SeeAlso|Example

Signature

object.ResizeOffset

objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutVolumeTheobjectthispropertyappliesto.

ResizeOffsetDouble;read-writeTheoffsetfromthecelltotheanchoredobject.

Remarks

TochangetheResizeOffsetvalue,youmustfirstsetApplyResizetoTrue.ModifyingResizeOffsetwhenApplyResizeisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

Tospecifyadistancebetweentheanchoredobjectandthecell,specifyanegativevalueforResizeOffset.Toextendtheanchoredobjectbeyondthecelledges,specifyapositivevalue.

RightOffsetPropertySpecifiestherightoffsetfortheanchoredobject.

SeeAlso|Example

Signature

object.RightOffset

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

RightOffsetDouble;read-writeTherightoffsetfortheanchoredobject.

Remarks

TochangetheRightOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingRightOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

RingsPropertyReturnsthecollectionofringsthatmakeuptheprofile.

SeeAlso|Example

Signature

object.Rings

objectAecProfileTheobjectthispropertyappliesto.

RingsAecRings;read-onlyCollectionofringsthatmakeuptheprofile.

RisePropertySpecifiestheriseofgabledmasselements.

SeeAlso|Example

Signature

object.Rise

objectAecMassElementTheobjectthispropertyappliesto.

RiseDouble;read-writeTheriseofthegabledmasselement.

RotationPropertySpecifiestherotationreferenceanglefortheobject.

SeeAlso|Example

Signature

object.Rotation

objectAecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutToolAecMaskBlockRef,AecMassELement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

RotationACAD_ANGLE;read-writeRotationreferenceanglefortheobject.

ScalePropertySpecifiesthescalefactorappliedtothehatchpattern.

SeeAlso|Example

Signature

object.Scale

objectAecDisplayComponentHatchTheobjectthispropertyappliesto.

ScaleDouble;read-write

Remarks

TheScalepropertydetermineshowthehatchpatternisrepeated.

ScaleOnInsertPropertySpecifieswhetherobjectsareautomaticallyscaledwheninsertedintothedrawing.

SeeAlso|Example

Signature

object.ScaleOnInsert

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

ScaleOnInsertBoolean;read-writeTRUE:Newobjectsarescaledautomatically.FALSE:Newobjectsarenotscaledautomatically.

ScaleXPropertySpecifiestheXdirectionscalefactoroftheinsertedblockorentity.

SeeAlso|Example

Signature

object.ScaleX

objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.

ScaleXDouble;read-writeScaleoftheblockintheXdirection.

ScaleYPropertySpecifiestheYdirectionscalefactoroftheinsertedblockorentity.

SeeAlso|Example

Signature

object.ScaleY

objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.

ScaleYDouble;read-writeScaleoftheblockintheYdirection.

ScaleZPropertySpecifiestheZdirectionscalefactoroftheinsertedblockorentity.

SeeAlso|Example

Signature

object.ScaleZ

objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.

ScaleZDouble;read-writeScaleoftheblockintheZdirection.

SectionedBodyRenderingMaterialNamePropertyGetsorsetsthenameofthesectionedbodyrenderingmaterial.

SeeAlso|Example

Signature

object.SectionedBodyRenderingMaterialName

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

SectionedBodyRenderingMaterialNameString;read-write

SectionRenderingMaterialNamePropertyGetsorsetsthenameofthesectionrenderingmaterial.

SeeAlso|Example

Signature

object.SectionRenderingMaterialName

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

SectionRenderingMaterialNameString;read-write

SegmentPerPolylinePropertySpecifiesthenumberoflinesegmentstobegeneratedforeachpolylinecurve.

SeeAlso|Example

Signature

object.SegmentPerPolyline

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

SegmentPerPolylineInteger;read-writeThenumberoflinesegmentstobegeneratedforeachpolylinecurve.0<SegmentPerPolyline<=42950

Systemvariables

ThevalueofthispropertyisstoredintheSPLINESEGSsystemvariable.

Remarks

Theinitialvalueis8.Thehigherthenumberyouspecify,thegreatertheperformanceimpact.

SelfIntersectsPropertyDeterminesiftheprofileisself-intersecting.

SeeAlso|Example

Signature

object.SelfIntersects

objectAecProfileTheobjectthispropertyappliesto.

SelfIntersectsBoolean;read-onlyTRUE:Profileintersectsitself.FALSE:Profiledoesnotintersectitself.

ShapePropertySpecifiestheshapeofthelayoutgrid.

SeeAlso|Example

Signature

object.Shape

objectAecLayoutGrid2DTheobjectthispropertyappliesto.

ShapeAecLayoutShapeenum;read-write

Theshapeofthelayoutgrid.

Side1PropertySpecifiesthelengthofthecutplanealongthestartingedge.

SeeAlso|Example

Signature

object.Side1

objectAecClipVolTheobjectthispropertyappliesto.

Side1Double;read-writeThelengthofthecutplanealongthestartingedge.

Side2PropertySpecifiesthelengthofthecutplanealongtheendingedge.

SeeAlso|Example

Signature

object.Side2

objectAecClipVolTheobjectthispropertyappliesto.

Side2Double;read-writeLengthofcutplanealongtheendingedge.

SolidFillPropertySpecifiesifmultilines,traces,solids,allhatches(includingsolid-fill)andwidepolylinesarefilledin.

SeeAlso|Example

Signature

object.SolidFill

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

SolidFillBoolean;read-write

TRUE:Displayssolidfills.

FALSE:Doesnotdisplaysolidfills.

Systemvariables

ThevalueofthispropertyisstoredintheFILLMODEsystemvariable.

Remarks

TheinitialvalueofthispropertyisTRUE.

SpacingPropertySpecifiesthespacingbetweennodesorforanindividualnodeonalayouttool,orthespacingbetweenrepeatedhatchpatternsforadisplaycomponent.

SeeAlso|Example

Signature

object.Spacing

objectAecDisplayComponentHatch,AecLayoutCurve,AecLayoutCurveNode,AecLayoutGrid2DNode,AecLayoutGrid2DXNode,AecLayoutGrid2DYNode,AecLayoutGrid3DNode,AecLayoutGrid3DXNode,AecLayoutGrid3DYNode,AecLayoutGrid3DZNode,AecLayoutNodeTheobjectthispropertyappliesto.

SpacingDouble;read-writeThespacingbetweennodesorforanindividualnodeonalayouttool,orthespacingbetweenrepeatedhatchpatternsforadisplaycomponent.

StartOffsetPropertySpecifiestheoffsetdistancefromthestartpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.

SeeAlso|Example

Signature

object.StartOffset

objectAecLayoutCurveTheobjectthispropertyappliesto.

StartOffsetDouble;read-writeTheoffsetdistancefromthestartpointofthecurve.

StylePropertySpecifiesthestyleoftheobject.

SeeAlso|Example

Signature

object.Style

objectAecMaskBlockRef,AecMassElement,AecMVBlockRef,AecPolygonTheobjectthispropertyappliesto.

StyleStyle;read-writeThestyleoftheobject.Thetypeofstyledependsonthetypeofobject,asfollows:

AecMaskBlockRef AecMaskBlockStyleAecMassElement AecMassElementStyleAecMVBlockRef AecMVBlockStyleAecPolygon AecPolygonStyle

StyleNamePropertySpecifiesthenameofthestylethatappliestotheobject.

SeeAlso|Example

Signature

object.StyleName

objectAecMaskBlockRef,AecMVBlockRef,AecPolygonTheobjectthispropertyappliesto.

StyleNameString;read-writeThestylename.

SubTypePropertySpecifiesthemasselementshapesubtype.

SeeAlso|Example

Signature

object.SubType

objectAecMassElementTheobjectthispropertyappliesto.

SubTypeAecMassElementSubType;read-only

SupportsAnchoringPropertySpecifieswhetherthemassgroupsupportselementanchoring.

SeeAlso|Example

Signature

object.SupportsAnchoring

objectAecMassGroupTheobjectthispropertyappliesto.

SupportsAnchoringBoolean;read-write

Remarks

Thispropertyenablesenhancedmassgroupbehavior.

SurfaceHatchPlacementPropertySpecifieshowthesurfacehatchpatternisplacedontheobject.

SeeAlso|Example

Signature

object.SurfaceHatchPlacement

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

SurfaceHatchPlacementAecSurfaceHatchPlacement;read-write

SurfaceRenderingMaterialNamePropertyGetsorsetsthenameofthesurfacerenderingmaterial.

SeeAlso|Example

Signature

object.SurfaceRenderingMaterialName

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

SurfaceRenderingMaterialNameString;read-write

SurfaceRenderMaterialMappingPropertySpecifieshowthesurfacerendermaterialismappedtotheobject.

SeeAlso|Example

Signature

object.SurfaceRenderMaterialMapping

objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.

SurfaceRenderMaterialMappingAecSurfaceMappingType;read-write

TextFrameDisplayPropertyTogglesthedisplayofframesfortextobjectsinsteadofdisplayingthetextitself.

SeeAlso|Example

Signature

object.TextFrameDisplay

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

TextFrameDisplayBoolean;read-write

TRUE:Displaystheframearoundtheextentsofthetext,butdoesnotdisplaythetextitself.

FALSE:Displaysthefulltext.

Systemvariables

ThevalueofthispropertyisstoredintheQTEXTMODEsystemvariable.

Remarks

TheinitialvalueforthispropertyisFALSE.

Afteryouenableordisablethisoption,youmustusetheRegenmethodtoupdatethedisplay.

TextHeightPropertySpecifiesthedefaultheightoftextinthedrawing.

SeeAlso|Example

Signature

object.TextHeight

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

TextHeightDouble;read-writeThetextheightininchesormillimeters.

Remarks

Thedefaultvalueis0.125inches,or3.175millimeters,dependingonthesettingoftheMeasurementUnitproperty.

TextStylesPropertyGetstheTextStylescollectionforthedocument.

SeeAlso|Example

Signature

object.TextStyles

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

TextStylesAcadTextStylescollection;read-onlyTheTextStylescollectionforthedocument.

TopOffsetPropertySpecifythetopoffsetfortheanchoredobject.

SeeAlso|Example

Signature

object.TopOffset

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

TopOffsetDouble;read-writeThetopoffsetfortheanchoredobject.(SeeRemarks.)

Remarks

TochangetheTopOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingTopOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

TypePropertyForlayoutcurves,specifieshownodesarespecifiedalongthecurve;formasselements,specifiestheshapeofthemasselement.

SeeAlso|Example

Signature

object.Type

objectAecLayoutCurve,AecMassElementTheobjectthispropertyappliesto.

TypeAecLayoutCurve:AecLayoutTypeenum;read-writeTypeofnodespacingalongthecurve.

AecMassElement:AecMassElementTypeenum;read-writeTheMassElementshape.

UseAngleOfObjectPropertySpecifiestheorientationofthehatchpattern.

SeeAlso|Example

Signature

object.UseAngleOfObject

objectAecDisplayComponentHatchTheobjectthispropertyappliesto.

UseAngleOfObjectBoolean;read-writeTRUE:Orientthehatchingtotheobject,regardlessoftheobjectrotation.FALSE:OrientthehatchingtotheWorldCoordinateSystem.

UseFixedViewDirectionPropertySpecifiesiftheFixedViewDirectionisusedforthedisplayconfiguration.

SeeAlso|Example

Signature

object.UseFixedViewDirection

objectAecDisplayConfigurationTheobjectthispropertyappliesto.

UseFixedViewDirectionBoolean;read-write

UseModelExtentsPropertyDeterminesiftheheightandlowerextensionaresetautomaticallyusingmodelextents.

SeeAlso|Example

Signature

object.UseModelExtents

objectAecClipVolTheobjectthispropertyappliesto.

UseModelExtentsBoolean;read-writeTRUE:HeightandLowerExtensionaresetautomaticallyFALSE:HeightandLowerExtensionarenotsetautomatically

UseOffsetPropertySpecifiesiftheoffsetvalueisused.

SeeAlso|Example

Signature

object.UseOffset

objectAecEntRefTheobjectthispropertyappliesto.

UseOffsetBoolean;read-write

UserCoordinateSystemsPropertyGetstheUCSscollectionforthedocument.

SeeAlso|Example

Signature

object.UserCoordinateSystems

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

UserCoordinateSystemsAcadUCSscollection;read-onlyTheUCSscollectionforthedocument.

ValidPropertyTeststhevalidityoftheobject.

SeeAlso|Example

Signature

object.Valid

objectAecProfile,AecRingTheobjectthispropertyappliesto.

ValidBoolean;read-onlyTRUE:Objectisvalid.FALSE:Objectisnotvalid.

Remarks

Aringisvalidifthefollowingaretrue:

Thereismorethanonesegment.Thesegmentsarecontinuous.Thesegmentsareclosed.Nosegmentintersectsitself.

Aprofileisvalidifeachringisclosedanddoesnotself-intersect,andtheprofileisnotselfintersecting.

ValuePropertyForlayeroverrides,specifiesthevalueofthelayerkeystyleoverride;forlayoutcurves,specifieseitherthespacingbetweennodesorthenumberofnodesonthelayoutcurve.

SeeAlso|Example

Signature

object.Value

objectAecLayerOverrideSetting,AecLayoutCurveTheobjectthispropertyappliesto.

ValueAecLayerOverrideSetting:String;read-writeThestringthelayerkeyoverrideissetto.

AecLayoutCurve:Variant;read-writeBayspacingornumberofevendivisionsonalayoutcurve.

Remarks

AecLayoutCurve:

Ifthecurveusesmanualspacing,Valueiszero.

ChecktheTypepropertytodeterminewhatValuerepresents.

VerticalScalePropertySpecifiesthescaleatwhichtheverticalaxisofthedrawingisdisplayed(inLandDevelopmentDesktoponly).

SeeAlso|Example

Signature

object.VerticalScale

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

HeadHeightDouble;read-writeTheverticalscale.Forexample,fora1:200scale,enter200.

Remarks

ThisisonlyusedinAutodeskLandDevelopmentDesktop.

ViewBlockDefsPropertyReturnsthecollectionofviewblockdefinitionsforthemulti-viewblockdisplayrepresentationdefinition.

SeeAlso|Example

Signature

object.ViewBlockDefs

objectAecMVBlockDisplayRepDefTheobjectthispropertyappliesto.

ViewBlockDefsAecViewBlockDefs;read-write

ViewBlocksPropertyReturnsthecollectionofviewblocksusedfordisplayrepresentationsbythemulti-viewblockreference.

SeeAlso|Example

Signature

object.ViewBlocks

objectAecMVBlockRefTheobjectthispropertyappliesto.

ViewBlocksAecViewBlocks;read-onlyThecollectionofviewblockreferences,witheachmulti-viewblockdisplayrepresentationmappedtoanindividualAcadBlock.

ViewDirectionPropertySpecifiestheviewdirectionfortheviewblockdefinition.

SeeAlso|Example

Signature

object.ViewDirection

objectAecViewBlockDefTheobjectthispropertyappliesto.

ViewDirectionAecViewDirection;read-write

ViewportsPropertyGetstheViewportscollectionforthedocument.

SeeAlso|Example

Signature

object.Viewports

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

ViewportsAcadViewportscollection;read-onlyTheViewportscollectionforthedocument.

ViewsPropertyGetstheViewscollectionforthedocument.

SeeAlso|Example

Signature

object.Views

objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.

ViewsAcadViewscollection;read-onlyTheViewscollectionforthedocument.

VisiblePropertySpecifieswhethertheobjectorapplicationisvisible.

SeeAlso|Example

Signature

object.Visible

objectAecBaseApplication,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMVBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectthispropertyappliesto.

VisibleBoolean;read-onlyTRUE:Theobjectorapplicationisvisible.FALSE:Theobjectorapplicationisnotvisible.

Remarks

Otherfactorscanalsocauseanobjecttobeinvisible.Forexample,anobjectwillnotbedisplayedifitslayerisofforfrozen.

Specifyingtheapplicationtobeinvisibleallowsyoutoruntasksinthebackgroundwithouthavingtoseethecomponent.

VoidPropertySpecifiesifaringproducesavoidinaprofile.

SeeAlso|Example

Signature

object.Void

objectAecRingTheobjectthispropertyappliesto.

VoidBoolean;read-writeTRUE:Ringisvoid.FALSE:Ringisadditive.

VolumePropertyReturnsthevolumeofthemasselementormassgroup.

SeeAlso|Example

Signature

object.Volume

objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.

VolumeDouble;read-onlyThevolumeofthemasselementormassgroup.

VolumeDisplayUnitPropertySpecifiestheunitsusedtodisplayvolumemeasurements.

SeeAlso|Example

Signature

object.VolumeDisplayUnit

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

VolumeDisplayUnitAecBuiltInUnitenum;read-writeTheunitsusedtodisplayvolumemeasurements.

VolumePrecisionPropertySpecifiesthenumberofdecimalplacesdisplayedforvolumemeasurements.

SeeAlso|Example

Signature

object.VolumePrecision

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

VolumePrecisionLong;read-writeThedisplayprecisionforvolumemesurements.

Remarks

Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.

VolumeSuffixPropertyThesuffixstringaddedwhenvolumemeasurementsaredisplayedinthedrawing.

SeeAlso|Example

Signature

object.VolumeSuffix

objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.

VolumeSuffixString;read-writeThesuffixdisplayedafterthevolumemeasurement.

Remarks

Thedefaultvalueis"Cu.Ft."or"m3",dependingonthevalueoftheMeasurementUnitproperty.Thevaluecanbeupto255charactersinlength.

WidthPropertySpecifiesthewidthoftheobject.

SeeAlso|Example

Signature

object.Width

objectAecLayoutGrid2D,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.

WidthDouble;read-writeThewidthoftheobject.

WindowStatePropertySpecifiesthestateoftheapplicationordocumentwindow.

SeeAlso|Example

Signature

object.WindowState

objectAecBaseDocumentTheobjectorobjectsthispropertyappliesto.

WindowStateacWindowStateenum;read-writeIndicatesiftheapplicationwindowisminimizedormaximized.

WindowTitlePropertyGetsthetitleofthedocumentwindow.

SeeAlso|Example

Signature

object.WindowTitle

objectAecBaseDocumentTheobjectorobjectsthispropertyappliesto.

WindowTitleString;read-onlyThewindowtitleofthedocument.

XCountPropertySpecifiesthenumberofnodesalongtheXdirection.

SeeAlso|Example

Signature

object.XCount

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

XCountLong;read-writeThenumberofnodesalongtheXdirection.

XDistancePropertySpecifiesthedistancealongthecurve'sXaxistotheanchoredobject.

SeeAlso|Example

Signature

object.XDistance

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

XDistanceDouble;read-writeDistancealongthecurve'sXaxistotheanchoredobject.

XOffsetPropertySpecifiestheoffsetintheXdirectionoftheviewblockwithinthemulti-viewblock,orthexoffsetforthehatchpatternofadisplaycomponent.

SeeAlso|Example

Signature

object.XOffset

objectAecDisplayComponentHatch,AecViewBlockTheobjectthispropertyappliesto.

XOffsetDouble;read-writeTheoffsetintheXdirection.

XPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheXDistancetoananchoredobjectismeasured.

SeeAlso|Example

Signature

object.XPositionFrom

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

XPositionFromAecCurvePositionenum;read-writeThepositiononthecurvefromwhichXDistanceismeasured.

XPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureXDistanceto.

SeeAlso|Example

Signature

object.XPositionTo

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

XPositionToAecEdgePositionenum;read-writeThepositionthatXDistancemeasuresto.

XRefEditPropertyDeterminesifthecurrentdrawingcanbeeditedinplacewhenbeingreferencedbyanotheruser.

SeeAlso|Example

Signature

object.XRefEdit

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

XRefEditBoolean;read-write

TRUE:Allowsin-placereferenceediting.

FALSE:Doesnotallowin-placereferenceediting.

Systemvariables

ThevalueofthispropertyisstoredintheXEDITsystemvariable.

Remarks

TheinitialvalueofthispropertyisTRUE.

XRefLayerVisibilityPropertyDeterminesthevisibilityofxref-dependentlayersandspecifiesifnestedxrefpathchangesaresaved.

SeeAlso|Example

Signature

object.XRefLayerVisibility

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

XRefLayerVisibilityBoolean;read-write

TRUE:Xref-dependentlayerchangesmadeinthecurrentdrawingtakeprecedence.

FALSE:Thelayertable,asstoredinthereferencedrawing(xref)takesprecedence.

Systemvariables

ThevalueofthispropertyisstoredintheVISRETAINsystemvariable.

Remarks

TheinitialvalueofthispropertyisTRUE.

WhenthispropertyissettoTRUE,layersettingsaresavedwiththecurrentdrawing'slayertableandpersistfromsessiontosession.Nestedxrefpathchangesaresavedwiththecurrentdrawingandpersistfromsessiontosession.

WhenthispropertyissettoFALSE,changesmadetoxref-dependentlayersinthecurrentdrawingarevalidinthecurrentsessiononly,butare

notsavedwiththedrawing.Whenthecurrentdrawingisreopened,thelayertableisreloadedfromthereferencedrawingandthecurrentdrawingreflectsthosesettings.Thelayersettingsaffectedare:On/Off,Freeze/Thaw,Color,andLinetype.Thissettingalsospecifiesthatchangesmadetothepathsofnestedxrefsareforthecurrentsessiononlyandarenotsavedwiththedrawing.

XrefOverlaysUseOwnDisplayConfigPropertyWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.

SeeAlso|Example

Signature

object.XrefOverlaysUseOwnDisplayConfig

objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.

XrefOverlaysUseOwnDisplayConfigBoolean;read-writeWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.

XRotationPropertySpecifiestherotationoftheanchoredobjectaroundtheXaxis.

SeeAlso|Example

Signature

object.XRotation

objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorEntToCurve,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

XRotationDouble;read-writeRotationoftheanchoredobjectaroundtheXaxis.

XSpacingPropertySpecifiesthespacingbetweennodesalongtheXdirectionofthelayoutgrid.

SeeAlso|Example

Signature

object.XSpacing

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

XSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheXdirectionofthelayoutgrid.

YAlignmentPropertySpecifiesthealignmentoftheanchoredobjectinrelationtothebaselineoftheassembly.

SeeAlso|Example

Signature

object.YAlignment

objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.

YAlignmentAecInfillAlignmentenum;read-writeAlignmentoftheinfillanchoredtotheassembly.(SeeRemarks.)

Remarks

TochangetheYAlignmentvalue,youmustfirstsetAllowVariationtoTrue.ModifyingYAlignmentwhenAllowVariationisFalsedoesnotresultinanerrororwarning,butithasnoeffect.

YCountPropertySpecifiesthenumberofnodesalongtheYdirection.

SeeAlso|Example

Signature

object.YCount

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

YCountLong;read-writeThenumberofnodesalongtheYdirection.

YDistancePropertySpecifiesthedistancealongthecurve'sYaxistotheanchoredobject.

SeeAlso|Example

Signature

object.YDistance

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

YDistanceDouble;read-writeDistancealongthecurve'sYaxistotheanchoredobject.

YOffsetPropertySpecifiestheYoffsetoftheanchoredobject,ortheoffsetintheYdirectionoftheviewblockwithinthemulti-viewblock,ortheYoffsetforthehatchpatternofadisplaycomponent.

SeeAlso|Example

Signature

object.YOffset

objectAecAnchorEntToGridAssembly,AecDisplayComponentHatch,AecViewBlockTheobjectthispropertyappliesto.

YOffsetDouble;read-writeTheoffsetintheYdirection.

YPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheYDistancetoananchoredobjectismeasured.

SeeAlso|Example

Signature

object.YPositionFrom

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

YPositionFromAecCurveWidthPositionenum;read-writeThepositiononthecurvefromwhichYDistanceismeasured.

YPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureYDistanceto.

SeeAlso|Example

Signature

object.YPositionTo

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

YPositionToAecPositionenum;read-writeThepositionthatYDistancemeasuresto.

YSpacingPropertySpecifiesthespacingbetweennodesalongtheYdirectionofthelayoutgrid.

SeeAlso|Example

Signature

object.YSpacing

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

YSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheYdirectionofthelayoutgrid.

ZCountPropertySpecifiesthenumberofnodesalongtheZdirection.

SeeAlso|Example

Signature

object.ZCount

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

ZCountLong;read-writeThenumberofnodesalongtheZdirection.

ZDistancePropertySpecifiesthedistanceabovethecurvetotheanchoredobject.

SeeAlso|Example

Signature

object.ZDistance

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

ZDistanceDouble;read-writeDistanceabovethecurvetotheanchoredobject.

ZOffsetPropertySpecifiestheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.

SeeAlso|Example

Signature

object.ZOffset

objectAecViewBlockTheobjectthispropertyappliesto.

ZOffsetDouble;read-writeTheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.

ZoomPropertySpecifiesthefocallengthofthecamera,inmillimeters.

SeeAlso|Example

Signature

object.Zoom

objectAecCameraTheobjectthispropertyappliesto.

ZoomDouble;read-writeLengthofthelensinmillimeters.

Remarks

The LENSLENGTHsystemvariablewillberesettotheZoomvaluewhenthecamerageneratesaview.

ZPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheZDistancetoananchoredobjectismeasured.

SeeAlso|Example

Signature

object.ZPositionFrom

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

ZPositionFromAecCurveHeightPositionenum;read-writeThepositiononthecurvefromwhichZDistanceismeasured.

ZPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureZDistanceto.

SeeAlso|Example

Signature

object.ZPositionTo

objectAecAnchorEntToCurveTheobjectthispropertyappliesto.

ZPositionToAecHeightenum;read-writeThepositionthatZDistancemeasuresto.

ZRotationPropertySpecifiestherotationoftheanchoredobjectaroundtheZaxis.

SeeAlso|Example

Signature

object.ZRotation

objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorEntToCurve,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.

ZRotationDouble;read-writeRotationoftheanchoredobjectaroundtheZaxis.

ZSpacingPropertySpecifiesthespacingbetweennodesalongtheZdirectionofthelayoutgrid.

SeeAlso|Example

Signature

object.ZSpacing

objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.

ZSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheZdirectionofthelayoutgrid.

ModifiedEventTriggeredwhenanobjectorcollectioninthedrawinghasbeenmodified.

SeeAlso|Example

Signature

object.Modified(Entity)Aec2dSection,AecAnchor,AecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNode,AecAnchorToRef,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDictionary,AecDictRecord,AecEditInPlaceProfile,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayerKeyStyle,AecLayerKeyStyles,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMaskBlockStyle,AecMaskBlockStyles,AecMassElement,AecMassElementStyle,AecMassElementStyles,AecMassGroup,AecMVBlockRef,AecMVBlockStyle,AecMVBlockStyles,AecObject,AecPolygon,AecPolygonStyle,AecPolygonStyles,AecProfileStyle,AecProfileStyles,AecSlice,AecVolumeLayoutToolAnobjectexpressionthatevaluatestoavalidcontainerobject.

EntityADrawingObjectTheobjectinthedrawingthatismodifiedcanbeanyoneofthedrawingobjects.

Remarks

Thiseventwillbetriggeredwhenevertheobjectismodified.Modificationincludeswheneverthevalueofapropertyisset,evenifthenewvalueisequaltothecurrentvalue.

WhencodinginVBA,youmustprovideaneventhandlerforallobjectsenabledfortheModifiedevent.Ifyoudonotprovideahandler,VBAmayterminateunexpectedly.

Noeventswillbefiredwhileamodaldialogisbeingdisplayed.

AutoCADobjectandlayercolors.

ACAD_COLOR

Name Value DescriptionacByBlock 0 Thecolordefinedfortheobject'sblock.

acRed 1 (red)

acYellow 2 (yellow)

acGreen 3 (green)

acCyan 4 (cyan)

acBlue 5 (blue)

acMagenta 6 (magenta)

acWhite 7 (white)

acByLayer(notvalidforLayerobject) 256 Thecolorofthelayertheobjectison.

ACAD_COLOR

AutoCADobjectandlayercolors.

Value Description0 Thecolordefinedfortheobject'sblock.

1 (red)

2 (yellow)

3 (green)

4 (cyan)

5 (blue)

6 (magenta)

7 (white)

acByLayer(notvalidforLayerobject) 256 Thecolorofthelayertheobjectison.

Lineweights.

AcLineWeight

Name ValueacLnWtByBlock -2

acLnWtByLayer -1

acLnWtByLwDefault -3

acLnWt000 0

acLnWt005 5

acLnWt009 9

acLnWt013 13

acLnWt015 15

acLnWt018 18

acLnWt020 20

acLnWt025 25

acLnWt030 30

acLnWt035 35

acLnWt040 40

acLnWt050 50

acLnWt053 53

acLnWt060 60

acLnWt070 70

acLnWt080 80

acLnWt090 90

acLnWt100 100

acLnWt106 106

AcLineWeight

acLnWt120 120

acLnWt140 140

acLnWt158 158

acLnWt200 200

acLnWt211 211

Drawingunits.

AcMeasurementUnit

Name ValueacEnglish English(Imperial)units

acMetric Metricunits

AcMeasurementUnit

Thestateoftheapplicationwindow.

AcWindowState

Name Value DescriptionacNorm 1 Normal(neitherminimizedormaximized)

acMin 2 Minimized

acMax 3 Maximized

AcWindowState

Unitofmeasurement.

AecBuiltInUnit

Name Value DescriptionaecUnitAcre 57 Acre

aecUnitAmpere 5 Ampere

aecUnitAngstrom 17 Angstrom

aecUnitAre 58 Are(100squaremeters)

aecUnitAstronomicalUnit 18 AstronomicalUnit

aecUnitBarn 59 Barn

aecUnitBarrel 98 Barrel

aecUnitBoardFoot 99 BoardFoot

aecUnitBolt 36 Bolt(40yards)

aecUnitBushel 100 Bushel

aecUnitCable 35 Cable(720feet)

aecUnitCaliber 32 Caliber(.01inches)

aecUnitCandela 7 Candela

aecUnitCentare 60 .01are(1squaremeter)

aecUnitCentiliter 101 Centiliter

aecUnitCentimeter 24 Centimeter

aecUnitCentury 175 Century

aecUnitChain 37 Chain

aecUnitChainEngineers 38 100feet(30.48meters)

aecUnitCord 102 Cord

aecUnitCubicAngstrom 122 CubicAngstrom

aecUnitCubicAstronomicalUnit 123 CubicAstronomicalUnit

AecBuiltInUnit

aecUnitCubicBolt 124 CubicBolt

aecUnitCubicCable 125 CubicCable

aecUnitCubicCaliber 126 CubicCaliber

aecUnitCubicCentimeter 103 CubicCentimeter

aecUnitCubicChain 127 CubicChain

aecUnitCubicCubit 128 CubicCubit

aecUnitCubicDecimeter 177 CubicDecimeter

aecUnitCubicFathom 129 CubicFathom

aecUnitCubicFoot 130 CubicFoot

aecUnitCubicFurlong 131 CubicFurlong

aecUnitCubicGigameter 132 CubicGigameter

aecUnitCubicHand 133 CubicHand

aecUnitCubicHectometer 134 CubicHectometer

aecUnitCubicInch 135 CubicInch

aecUnitCubicLeagueNautical 136 CubicLeagueNautical

aecUnitCubicLeagueStatute 137 CubicLeagueStatute

aecUnitCubicLightYear 138 CubicLightYear

aecUnitCubicLink 139 CubicLink

aecUnitCubicMeter 96 CubicMeter

aecUnitCubicMil 140 CubicMil

aecUnitCubicMileNautical 141 CubicMileNautical

aecUnitCubicMileStatute 142 CubicMileStatute

aecUnitCubicMillimeter 143 CubicMillimeter

aecUnitCubicMillimicron 144 CubicMillimicron

aecUnitCubicLeagueNautical 136 CubicNauticalLeague

aecUnitCubicMileNautical 141 CubicNauticalMile

aecUnitCubicPace 145 CubicPace

aecUnitCubicPalm 146 CubicPalm

aecUnitCubicParsec 147 CubicParsec

aecUnitCubicPerch 148 CubicPerch

aecUnitCubicRope 149 CubicRope

aecUnitCubicSkein 150 CubicSkein

aecUnitCubicSpan 151 CubicSpan

aecUnitCubicLeagueStatute 137 CubicStatuteLeague

aecUnitCubicMileStatute 142 CubicStatuteMile

aecUnitCubicSurveyFoot 152 CubicSurveyFoot

aecUnitCubicYard 153 CubicYard

aecUnitCubit 40 Cubit

aecUnitDalton 154 Dalton(atomicmassunit)

aecUnitDay 169 Day

aecUnitDecade 174 Decade

aecUnitDecimeter 23 Decimeter

aecUnitDecistere 104 Decistere

aecUnitDekaliter 105 Dekaliter

aecUnitDekameter 22 Dekameter

aecUnitDekastere 106 Dekastere

aecUnitDimensionless 0 Dimensionless

aecUnitDram 107 Dram

aecUnitDryPint 108 DryPint

aecUnitDryQuart 109 DryQuart

aecUnitFathoms 34 Fathom

aecUnitFirkin 110 Firkin

aecUnitFluidOunce 116 FluidOunce

aecUnitFluidPint 118 FluidPint

aecUnitFluidQuart 119 FluidQuart

aecUnitFoot 30 Foot

aecUnitFortnight 171 Fortnight

aecUnitFurlong 41 Furlong

aecUnitGallon 111 Gallon

aecUnitGigameter 19 Gigameter

aecUnitGill 112 Gill(.5cups)

aecUnitGrain 155 Grain

aecUnitGram 156 Gram

aecUnitHand 42 Hand(4inches)

aecUnitHectare 61 Hectare

aecUnitHectometer 21 Hectometer

aecUnitHogshead 113 Hogshead

aecUnitHour 168 Hour

aecUnitHundredweight 157 Hundredweight

aecUnitInch 31 Inch

aecUnitJoule 12 Joule

aecUnitKelvin 4 Kelvin

aecUnitKilogram 1 Kilogram

aecUnitKiloliter 114 Kiloliter

aecUnitKilometer 20 Kilometer

aecUnitLeagueNautical 45 LeagueNautical

aecUnitLeagueStatute 46 LeagueStatute

aecUnitLightYear 28 LightYear

aecUnitLink 39 Link(7.92inches)

aecUnitLiter 97 Liter

aecUnitLongTon 158 2240pounds(1.016metrictons)

aecUnitLumen 11 Lumen

aecUnitLux 16 Lux

aecUnitMeter 2 Meter

aecUnitMicron 26 Micron

aecUnitMil 47 Mil

aecUnitMile 44 Mile

aecUnitMileNautical 43 MileNautical

aecUnitMillenium 176 Millenium

aecUnitMillimeter 25 Millimeter

aecUnitMillimicron 27 Millimicron

aecUnitMinim 115 Minim

aecUnitMinute 167 Minute

aecUnitMole 6 Mole

aecUnitLeagueNautical 45 NauticalLeague

aecUnitTonne 166 MetricTon(tonne)

aecUnitMileNautical 43 NauticalMile

aecUnitNewton 10 Newton

aecUnitOunce 159 Ounce

aecUnitOunceTroy 160 OunceTroy

aecUnitPace 48 Pace

aecUnitPalm 49 Palm(3inches)

aecUnitParsec 29 Parsec

aecUnitPascals 13 Pascal

aecUnitPeck 117 Peck

aecUnitPennyweight 161 Pennyweight

aecUnitPound 162 Pound

aecUnitRadian 8 Radian

aecUnitRegisterTon 120 RegisterTon

aecUnitRod 50 Rod

aecUnitRope 51 rope

aecUnitSecond 3 Second

aecUnitSiderealYear 172 SiderealYear

aecUnitSkein 52 Skein

aecUnitSlug 163 Slug

aecUnitSpan 53 Span

aecUnitSquareAngstrom 62 SquareAngstrom

aecUnitSquareAstronomicalUnit 63 SquareAngstrom

aecUnitSquareBolt 64 SquareBolt

aecUnitSquareCable 65 SquareCable

aecUnitSquareCaliber 66 SquareCaliber

aecUnitSquareCentimeter 67 SquareCentimeter

aecUnitSquareChain 94 SquareChain

aecUnitSquareCubit 68 SquareCubit

aecUnitSquareDecimeter 69 SquareDecimeter

aecUnitSquareFathom 70 SquareFathom

aecUnitSquareFoot 56 SquareFoot

aecUnitSquareFurlong 71 SquareFurlong

aecUnitSquareGigameter 72 SquareGigameter

aecUnitSquareHand 73 SquareHand

aecUnitSquareInch 74 SquareInch

aecUnitSquareKilometer 75 SquareKilometer

aecUnitSquareLeagueNautical 76 SquareLeagueNautical

aecUnitSquareLeagueStatute 77 SquareLeagueStatute

aecUnitSquareLightYear 78 SquareLightYear

aecUnitSquareLink 79 SquareLink

aecUnitSquareMeters 55 SquareMeter

aecUnitSquareMicron 80 SquareMicron

aecUnitSquareMil 81 SquareMil

aecUnitSquareMileNautical 82 SquareMileNautical

aecUnitSquareMileStatute 83 SquareMileStatute

aecUnitSquareMillimicron 84 SquareMillimicron

aecUnitSquareLeagueNautical 76 SquareNauticalLeague

aecUnitSquareMileNautical 82 SquareNauticalMile

aecUnitSquarePace 85 SquarePace

aecUnitSquarePalm 86 SquarePalm

aecUnitSquareParsec 87 SquareParsec

aecUnitSquarePerch 88 SquarePerch

aecUnitSquareRope 89 SquareRope

aecUnitSquareSkein 90 SquareSkein

aecUnitSquareSpan 91 SquareSpan

aecUnitSquareLeagueStatute 77 SquareStatuteLeague

aecUnitSquareMileStatute 83 SquareStatuteMile

aecUnitSquareSurveyFoot 92 SquareSurveyFoot

aecUnitSquareYard 93 SquareYard

aecUnitLeagueStatute 46 StatuteLeague

aecUnitSteradian 9 Steradian

aecUnitStone 164 Stone

aecUnitSurveyFoot 54 SurveyFoot

aecUnitTon 165 Ton

aecUnitTonne 166 Tonne(metricton)

aecUnitTownship 95 Township(36squaremiles)

aecUnitTropicalYear 173 365days,5hours,48minutes,45.51seconds(astronomicalyear)

aecUnitTun 121 Tun

aecUnitVolt 15 Volt

aecUnitWatt 14 Watt

aecUnitWeek 170 Week

aecUnitYards 33 Yard

Positiononthecurve.

AecCurveHeightPosition

Name Value DescriptionaecCurveHeightPositionBottom 0 Bottom

aecCurveHeightPositionCenter 1 Center

aecCurveHeightPositionTop 2 Top

AecCurveHeightPosition

Positiononthecurve.

AecCurvePosition

Name Value DescriptionaecCurvePositionStart 0 Start

aecCurvePositionMiddle 1 Middle

aecCurvePositionEnd 2 End

AecCurvePosition

Positiononthecurve.

AecCurveWidthPosition

Name Value DescriptionaecCurveWidthPositionLeft 0 Left

aecCurveWidthPositionCenter 1 Center

aecCurveWidthPositionRight 2 Right

AecCurveWidthPosition

Positionmeasuredto.

AecEdgePosition

Name Value DescriptionaecEdgePositionStart 0 Start

aecEdgePositionCenter 1 Center

aecEdgePositionEnd 2 End

AecEdgePosition

Positionontheobject.

AecHeight

Name Value DescriptionaecHeightBottom 0 Bottom

aecHeightCenter 1 Center

aecHeightTop 2 Top

AecHeight

Alignmentinrelationtobaseline.

AecInfillAlignment

Name Value DescriptionaecInfillAlignCentered 0 Centered

aecInfillAlignFrontFlush 1 Infrontofthebaseline

aecInfillAlignBackFlush 2 Inbackofthebaseline

AecInfillAlignment

Theshapeofalayoutgrid.

AecLayoutShape

Name Value DescriptionaecLayoutShapeRectangular 0 Rectangularlayout

aecLayoutShapeRadial 1 Radiallayout

aecLayoutShapeCustom 2 Customlayout

AecLayoutShape

Typeofnodespacingalongthecurve.

AecLayoutType

Name Value DescriptionaecLayoutTypeManualSpacing 0 Manualspacing

aecLayoutTypeAutoSpacingEven 1 Spacedevenlyalongthecurve

aecLayoutTypeAutoSpacingBay 2 Automaticspacing,determinedbythespecifieddistancebetweennodes

AecLayoutType

Subtypeofthemasselement.

AecMassElementSubType

Name Value DescriptionaecMassElementSubTypeUnspecified -1 Unspecified

aecMassElementSubTypeProfileInternal 0 ProfileInternal

aecMassElementSubTypeProfileExternal 1 ProfileExternal

AecMassElementSubType

Shapeofthemasselement.

AecMassElementType

Name Value DescriptionaecMassElementTypeArch 1 Arch

aecMassElementTypeBarrelVault 2 Barrelvault

aecMassElementTypeBox 0 Box

aecMassElementTypeDoric 3 Simplecolumn

aecMassElementTypeCone 4 Cone

aecMassElementTypeCylinder 5 Cylinder

aecMassElementTypeDome 6 Dome

aecMassElementTypeExtrusion 12 Extrusionofaprofile

aecMassElementTypeFreeForm 14 Freeform

aecMassElementTypeGable 7 Gable

aecMassElementTypeIsoscelesTriangle 8 Isoscelestriangle

aecMassElementTypePyramid 10 Pyramid

aecMassElementTypeRevolution 13 Revolvedprofile

aecMassElementTypeRightTriangle 9 Righttriangle

aecMassElementTypeSphere 11 Sphere

AecMassElementType

Typeofoperationcombiningobjects.

AecMassOperation

Name Value DescriptionaecMassOperationAdd 0 Addition

aecMassOperationSubtract 1 Subtraction

aecMassOperationIntersect 2 Intersection

AecMassOperation

PlacementofedgesonAECPolygonvertices.

AecPolygonStyleEdgeWidthJustification

Name Value DescriptionaecPolygonEdgeWidthJustificationIn 0 Insideedge

aecPolygonEdgeWidthJustificationCenter 1 Center

aecPolygonEdgeWidthJustificationOut 2 Outsideedge

AecPolygonStyleEdgeWidthJustification

Positionontheobject.

AecPosition

Name Value DescriptionaecPositionFront 0 Front

aecPositionCenter 1 Center

aecPositionBack 2 Back

AecPosition

AddExampleSubExample_Add_AecProfile()

'Thisexampledefinesacustomprofileconsistingof'oftwotriangles,onewithintheother.

DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationDimprofileStyleAsAecProfileStyleDimprofileAsNewAecProfileDimprofileNameAsStringapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getexistingoraddanewprofilestyle.OnErrorResumeNextprofileName="BOOBYPRIZE"SetprofileStyle=doc.ProfileStyles.Add(profileName)

'Iferroroccurred,theprofileprobablyalreadyexists.IfErr.Number0ThenErr.ClearOnErrorGoTo0SetprofileStyle=doc.ProfileStyles.Item(profileName)EndIf

'Definedefinitionpointsforrings.DimOuterPts(0To7)AsDoubleDimInnerPts(0To7)AsDouble

OuterPts(0)=0:OuterPts(1)=0OuterPts(2)=648:OuterPts(3)=0OuterPts(4)=324:OuterPts(5)=324OuterPts(6)=0:OuterPts(7)=0

InnerPts(0)=120:InnerPts(1)=60

InnerPts(2)=528:InnerPts(3)=60InnerPts(4)=324:InnerPts(5)=264InnerPts(6)=120:InnerPts(7)=60

'Createandsettheouterring.Dimring1AsAecRingSetring1=profile.Rings.Addring1.FromPoints(OuterPts)ring1.Void=False

'Createandsettheinnerring.Dimring2AsAecRingSetring2=profile.Rings.Addring2.FromPoints(InnerPts)ring2.Void=True

'Settheprofiledefinition.SetprofileStyle.profile=profileMsgBox("Profile"""&profileName&"""created.")

EndSub

AdjustSizingExampleSubExample_AdjustSizing()

'Thisexamplemodifiesthetopoffsetoftheselectedobject'inrelationtoitsanchorpointonthegridassembly.It'promptstheusertoselecttheobjecttobemodified,'andthenitpromptstheusertospecifythenumberofinches'toadjusttheoffsetby.TheAdjustSizingpropertyischecked,'andifitisnotcurrentlysettoTrue,itisresetandthe'theuserisadvisedofthechange.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimoffsetAsStringDimoffset_adjustAsDoubleOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"AdjustSizingExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0

IfanchorIsNothingThenMsgBox"Selectedobjectisnotanchored.",vbExclamation,"AdjustSizingExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"AdjustSizingExample"Else'AdjustSizingmustbesettoTrueinorderforoffsetchangetotakeeffect.Ifanchor.AdjustSizing=FalseThenanchor.AdjustSizing=TrueMsgBox"AdjustSizingresetfromFalsetoTrue"EndIfMsgBox"Topoffsetofobjectwas:"&anchor.TopOffset,vbInformation,"TopOffsetExample"'Promptusertospecifyamounttoadjustoffsetby.offset_adjust=ThisDrawing.Utility.GetReal("Enterthenumberofinchestoadjusttopoffsetby:")'Changeoffsetbyspecifiedamount.anchor.TopOffset=anchor.TopOffset+offset_adjustThisDrawing.Regen(acActiveViewport)MsgBox"Newtopoffsetis:"&anchor.TopOffset,vbInformation,"TopOffsetExample"EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"AdjustSizingExample"EndIf

EndSub

AllowVariationExampleSubExample_AllowVariation()

'Thisexamplewilladdanchoranewmasselementtocellinagridassembly.DimgridAsAecGridAssemblyDimpolyAsAecPolygonDimptAsVariantDimobjAsAcadObjectThisDrawing.Utility.GetEntityobj,pt,"Selectgridtoattachto"IfTypeOfobjIsAecGridAssemblyThenSetgrid=objSetpoly=ThisDrawing.ModelSpace.AddCustomObject("AecPolygon")DimanchorAsNewAecAnchorEntToGridAssemblyanchor.Reference=grid'anchorthemasselementtothefirstcellinthegridanchor.Cell=2anchor.AllowVariation=Trueanchor.BottomOffset=6anchor.LeftOffset=6anchor.RightOffset=6anchor.TopOffset=6anchor.YAlignment=aecInfillAlignFrontFlushanchor.AdjustSizing=Truepoly.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"NodeExample"EndIf

EndSub

AlternateNameExampleSubExample_AlternateName_Add_Aec()

'Thisexamplelistthemulti-viewblockstylesinthecurrent'drawing,andallowstheusertoaddanalternatenametoeach'style(ifanalternatenamedoesnotalreadyexist).'Usethisexamplewithadrawingthatcontainsoneormore'multi-viewblockstyles.

DimappAsNewAecBaseApplicationDimdocAsAecBaseDocumentDimmvblockStylesAsAecMVBlockStylesDimmvblockStyleAsAecMVBlockStyleDimmsgAsStringDimaltnameAsStringDimreplyAsIntegerapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument

'Getthecollectionofmulti-viewblockstylesinthedrawing.SetmvblockStyles=doc.mvblockStyles'Iftherearenomulti-viewblockstylesdefinedinthe'drawing,alertuserandthenexit.IfmvblockStyles.count=0Thenmsg="Therearenomulti-viewblockstylesinthedrawing."MsgBoxmsg,vbExclamation,"AlternateNameExample"ExitSubEndIf

'Listthenameandalternatenameofeachmulti-viewblock'styleinthecurrentdrawing.IfAlternateNameisblank,'allowusertosetit.ForEachmvblockStyleInmvblockStyles

msg="MVblockstylename:"&mvblockStyle.Name&vbCrLfaltname=mvblockStyle.AlternateNameIfaltname=""Thenmsg=msg&"Thereisnoalternatenamefor"&mvblockStyle.Name&vbCrLf&"AddoneatCommandprompt?"reply=MsgBox(msg,vbYesNo,"SetalternatenameatCommandprompt?")'Promptusertoenteranalternatename,iftheychose'todoso.Ifreply=vbYesThendoc.Utility.Promptlistaltname=doc.Utility.GetString(True,"Alternatename-->")mvblockStyle.AlternateName=altnameEndIfElsemsg=msg&"Alternatename:"&mvblockStyle.AlternateName&vbCrLfMsgBoxmsg,vbInformation,"AlternameNameExample"EndIfNext

EndSub

Angle1ExampleSubExample_Angle1()

'Thisexampleshowsthedeviationofcutplaneatstartingedgewherezerois'perpendiculartothebuildingelevationline

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Angle1is:"&clip.Angle1,vbInformation,"Angle1Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Angle1Example"EndIf

EndSub

Angle2ExampleSubExample_Angle2()

'Thisexampleshowsthedeviationofcutplaneatstartingedgewherezerois'perpendiculartothebuildingelevationline

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Angle2is:"&clip.Angle2,vbInformation,"Angle2Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Angle2Example"EndIf

EndSub

AngleFromNodeExampleSubExample_AngleFromNode()

'Thisexamplewillfindtheanglefromthenodeforabubbleattachedtoa'columngridDimobjAsAcadObjectDimbubbleAsAecMVBlockRefDimanchorAsAecAnchorDimleaderAnchorAsAecAnchorLeadEntToNodeDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectbubble"IfTypeOfobjIsAecMVBlockRefThenSetbubble=objSetanchor=obj.GetAnchorIfTypeOfanchorIsAecAnchorLeadEntToNodeThenSetleaderAnchor=anchorMsgBox"Anglefromnode="&ThisDrawing.Utility.AngleToString(leaderAnchor.AngleFromNode,acDegrees,4),vbInformation,"ExampleAngleFromNode"ElseMsgBox"Notanchoredtocolumngrid",vbInformation,"ExampleAngleFromNode"EndIfElseMsgBox"Notabubble",vbInformation,"ExampleAngleFromNode"EndIf

EndSub

AngularAzimuthExampleSubExample_AngularAzimuth()

'ThisexamplereturnstheAngularAzimuthsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

'Converttheconstanttoastring.

DimStyleAsString

DimAngAzmAsLong

'DetermineAngularAzimuthsetting

AngAzm=dbPref.AngularAzimuth

SelectCaseAngAzm

Case0

Style="bearings."

Case1

Style="northazimuths."

Case2

Style="southazimuths."

EndSelect

MsgBox"ThecurrentvalueforAngularAzimuthis"&Style,vbInformation,"AngularAzimuthExample"

EndSub

AngularDisplayFormatExampleSubExample_AngularDisplayFormat()'ThisexamplereturnstheAngularDisplayFormatsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferencesSetdbPref=AecArchBaseApplication.ActiveDocument.Preferences'Converttheconstanttoastring.DimstrUnitsAsStringSelectCasedbPref.AngularDisplayFormatCase0strUnits="Degrees."Case1strUnits="Degrees/Minutes/Seconds"Case2strUnits="Grads."Case3strUnits="Radians"Case4strUnits="Surveyor"EndSelectMsgBox"ThecurrentvalueforAngularDisplayFormatis"&strUnits,_vbInformation,"AngularDisplayFormatExample"EndSub

AngularPrecisionExampleSubExample_AngularPrecision()

'ThisexamplereturnstheAngularPrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforAngularPrecisionis"&dbPref.AngularPrecision,_

vbInformation,"AngularPrecisionExample"

EndSub

ApplicationExampleSubExample_Application()'Thisexamplecreatesalineandthenusesthe'Applicationpropertyofthelinetoreturnthe'applicationname.DimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoubleDimmyAppAsAcadApplication'CreateanewlinereferencestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=2:endPoint(1)=2:endPoint(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)lineObj.Update

'ReturntheapplicationfortheobjectSetmyApp=lineObj.Application'DisplaythenameoftheapplicationMsgBox"Theapplicationnameis:"&myApp.name,vbInformation,"ApplicationExample"EndSub

ApplyResizeExampleSubExample_ApplyResize()

'Thisexamplewilltakeamasselementanchoredtoa2DLayoutGrid,and'applyaResizeOffsettoit.

DimobjAsAcadObjectDimanchorAsAecAnchorEntToLayoutCellDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectanchoredelement"IfTypeOfobjIsAecMassElementThenDimmassAsAecMassElementSetmass=objIfTypeOfmass.GetAnchorIsAecAnchorEntToLayoutCellThenSetanchor=mass.GetAnchoranchor.ResizeOffset=-22anchor.ApplyResize=FalseEndIfEndIf

EndSub

AreaExampleExamples:

lAecProfile

lAecSlice

SubExample_Area_AecProfile()

'ThisexampleshowstheareaoftheprofileofanAecPolygon

DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"

IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileArea:"&poly.Profile.Area,vbInformation,"AreaExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"AreaExample"EndIf

EndSub

SubExample_Area_AecSlice()

'ThisexamplewilldisplaytheareaofonesliceinthecurrentdrawingDimsliceAsAecSliceDimobjAsObjectDimcounterAsInteger

counter=0ForEachobjInThisDrawing.ModelSpaceIfTypeOfobjIsAecSliceAndcounter<1Thencounter=counter+1Setslice=objMsgBox"SliceArea:"&slice.Area,vbInformation,"AreaExample"EndIfNextIfcounter=0ThenMsgBox"NoSliceinDrawing",vbInformation,"AreaExample"EndIf

EndSub

AreaDisplayUnitExampleSubExample_AreaDisplayUnit()

'ThisexamplereturnstheAreaDisplayUnitsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Converttheareadisplayunittoastring.

DimunitAsString

SelectCasedbPref.AreaDisplayUnit

CaseaecUnitSquareInch

unit="squareinch."

CaseaecUnitSquareFoot

unit="squarefoot."

CaseaecUnitSquareYard

unit="squareyard."

CaseaecUnitSquareMil

unit="squaremillimeters."

CaseaecUnitSquareCentimeter

unit="squarecentimeters."

CaseaecUnitSquareDecimeter

unit="squaredecimeters."

CaseaecUnitSquareMeters

unit="squaremeters."

EndSelect

MsgBox"ThecurrentvalueforAreaDisplayUnitis"&unit,_

vbInformation,"AreaDisplayUnitExample"

EndSub

AreaPrecisionExampleSubExample_AreaPrecision()

'ThisexampledisplaystheAreaPrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThecurrentvalueforAreaPrecisionis:"&dbPref.AreaPrecision,_

vbInformation,"AreaPrecisionExample"

EndSub

AreaSuffixExampleSubExample_AreaSuffix()

'ThisexampledisplaystheAreaSuffixsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThecurrentvalueforAreaSuffixis:"&dbPref.AreaSuffix,_

vbInformation,"AreaSuffixExample"

EndSub

ArrayPolarExampleSubExample_ArrayPolar()'Thisexamplecreatesacircleandthenperformsapolararray'onthatcircle.'CreatethecircleDimcircleObjAsAcadCircleDimcenter(0To2)AsDoubleDimradiusAsDoublecenter(0)=2#:center(1)=2#:center(2)=0#radius=1SetcircleObj=ThisDrawing.ModelSpace.AddCircle(center,radius)ZoomAllMsgBox"Performthepolararrayonthecircle.",,"ArrayPolarExample"'DefinethepolararrayDimnoOfObjectsAsIntegerDimangleToFillAsDoubleDimbasePnt(0To2)AsDoublenoOfObjects=4angleToFill=3.14'180degreesbasePnt(0)=4#:basePnt(1)=4#:basePnt(2)=0#'Thefollowingexamplewillcreate4copiesofanobject'byrotatingandcopyingitaboutthepoint(3,3,0).DimretObjAsVariantretObj=circleObj.ArrayPolar(noOfObjects,angleToFill,basePnt)ZoomAllMsgBox"Polararraycompleted.",,"ArrayPolarExample"EndSub

ArrayRectangularExampleSubExample_ArrayRectangular()'Thisexamplecreatesacircleandthenperforms'arectangulararrayonthatcircle.'CreatethecircleDimcircleObjAsAcadCircleDimcenter(0To2)AsDoubleDimradiusAsDoublecenter(0)=2#:center(1)=2#:center(2)=0#radius=0.5SetcircleObj=ThisDrawing.ModelSpace.AddCircle(center,radius)ThisDrawing.Application.ZoomAllMsgBox"Performtherectangulararrayonthecircle.",,"ArrayRectangularExample"'DefinetherectangulararrayDimnumberOfRowsAsLongDimnumberOfColumnsAsLongDimnumberOfLevelsAsLongDimdistanceBwtnRowsAsDoubleDimdistanceBwtnColumnsAsDoubleDimdistanceBwtnLevelsAsDoublenumberOfRows=5numberOfColumns=5numberOfLevels=2distanceBwtnRows=1distanceBwtnColumns=1distanceBwtnLevels=1'CreatethearrayofobjectsDimretObjAsVariantretObj=circleObj.ArrayRectangular(numberOfRows,numberOfColumns,numberOfLevels,distanceBwtnRows,distanceBwtnColumns,distanceBwtnLevels)ZoomAllMsgBox"Rectangulararraycompleted.",,"ArrayRectangularExample"EndSub

AttachAnchorExampleSubExample_AttachAnchor()'Thisexamplewillmakeamasselementandandanchorittoaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortomass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

AttachEntityExampleSubExample_AttachEntity()

'Thisexamplewillmakeamasselementandandanchorittoaline.DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.AttachEntitymass'attachthemasselementtotheanchor

EndSub

BasePointExampleSubExample_BasePoint()

'ThisexampledisplaystheBasePointsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

DimvarPointAsVariant

Dimpoint(0To2)AsDouble

DimbasePointAsString

'Getthebasepoint

varPoint=dbPref.BasePoint

point(0)=varPoint(0)

point(1)=varPoint(1)

point(2)=varPoint(2)

'Formatbasepointtoastring

basePoint=Format(point(0))+","+Format(point(1))+","+Format(point(2))

MsgBox"ThecurrentvalueforBasePointis:"&basePoint,vbInformation,"BasePointExample"

EndSub

BasePointNEExampleSubExample_BasePointNE()

'ThisexampledisplaystheBasePointNEsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

DimvarPointAsVariant

Dimpoint(0To2)AsDouble

DimbasePointNEAsString

'Getthebasepoint

varPoint=dbPref.basePointNE

point(0)=varpoint(0)

point(1)=varpoint(1)

point(2)=varpoint(2)

'Formatbasepointtoastring

basePointNE=Format(point(0))+","+Format(point(1))+","+Format(point(2))

MsgBox"ThecurrentvalueforBasePointNEis:"&basePointNE,_

vbInformation,"BasePointNEExample"

EndSub

BlocksExampleSubExample_Blocks()'Thisexamplefirstfindstheblockscollection'usingtheBlocksproperty.Itthenaddsanew'blocktotheblockcollection.DimblkCollAsAcadBlocksDimnewBlockAsAcadBlockDiminsertionPnt(0To2)AsDouble'GettheBlockscollectionSetblkColl=ThisDrawing.Blocks'DefinetheinsertionpointforthenewblockinsertionPnt(0)=0#:insertionPnt(1)=0#:insertionPnt(2)=0#'AddthenewblockintotheblockscollectionSetnewBlock=blkColl.Add(insertionPnt,"TEST")MsgBox"Ablockcalled"&newBlock.name&"hasbeenaddedtotheblockscollection",vbInformation,"BlocksExample"EndSub

BottomOffsetExampleSubExample_BottomOffset()

'Thisexamplemodifiesthebottomoffsetoftheselectedobject'inrelationtoitsanchorpointonthegridassembly.It'promptstheusertoselecttheobjecttobemodified,'andthenitpromptstheusertospecifythenumberofinches'toadjusttheoffsetby.Thenumbercanbeeitherpositive'ornegative.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.

DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimoffsetAsStringDimoffset_adjustAsDoubleOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"BottomOffsetExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0IfanchorIsNothingThen

MsgBox"Selectedobjectisnotanchored.",vbExclamation,"BottomOffsetExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"BottomOffsetExample"Else'AdjustSizingmustbesettoTrueinorderforoffsetchangetotakeeffect.anchor.AdjustSizing=TrueMsgBox"Bottomoffsetofobjectwas:"&anchor.BottomOffset,vbInformation,"BottomOffsetExample"'Promptusertospecifyamounttoadjustoffsetby.offset_adjust=ThisDrawing.Utility.GetReal("Enterthenumberofinchestoadjusttopoffsetby:")'Changeoffsetbyspecifiedamount.anchor.BottomOffset=anchor.BottomOffset+offset_adjustThisDrawing.Regen(acActiveViewport)MsgBox"Newbottomoffsetis:"&anchor.BottomOffset,vbInformation,"BottomOffsetExample"EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"BottomOffsetExample"EndIf

EndSub

BoundsExampleSubExample_Bounds()

'Thisexamplewilldisplaytheboundsofthefirstprofileinthedrawing.

DimdocAsAecArchBaseDocumentDimcProfileStylesAsAecProfileStylesDimprofileStyleAsAecProfileStyleDimprofileAsAecProfile

Setdoc=AecArchBaseApplication.ActiveDocumentSetcProfileStyles=doc.ProfileStylesIfcProfileStyles.Count>0ThenSetprofileStyle=cProfileStyles.Item(0)Setprofile=profileStyle.profileMsgBox"ProfileBounds:"&vbCR&_

"TopLeft:"&Format(profile.bounds(0),"0.000")&","&Format(profile.bounds(1),"0.000")&vbCr&_ "BottomRight:"&Format(profile.bounds(2),"0.000")&","&Format(profile.bounds(3),"0.000"),_

vbInformation,"BoundsExample"ElseMsgBox"NoAECProfilesinthedrawing",vbInformation,"BoundsExample"EndIf

EndSub

CellExampleSubExample_Cell()

'Thisexamplewilladdanchoranewmasselementtocellina2Dlayoutgrid.DimgridAsAecGridAssemblyDimmassAsAecMassElementDimptAsVariantDimobjAsAcadObjectThisDrawing.Utility.GetEntityobj,pt,"Selectgridtoattachto"IfTypeOfobjIsAecGridAssemblyThenSetgrid=objSetmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")DimanchorAsNewAecAnchorEntToGridAssemblyanchor.Reference=grid'anchorthemasselementtothefirstcellinthegridanchor.Cell=1mass.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"NodeExample"EndIf

EndSub

CenterOnNodeExampleSubExample_CenterOnNode()

'ThisexampleattachesaMassElementtoa2DLayoutGrid,andcentersthemasson

'thenode.

DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenDimgridAsAecLayoutGrid2DSetgrid=objDimmassAsAecMassElementSetmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")DimanchorAsNewAecAnchorEntToLayoutNodeanchor.Reference=gridanchor.Node=1anchor.CenterOnNode=Truemass.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"CenterOnNodeExample"EndIf

EndSub

CentroidExampleSubExample_Centroid()

'Thisexamplewilldisplaythecentroidofthefirstprofileinthedrawing.

DimdocAsAecArchBaseDocumentDimcProfileStylesAsAecProfileStylesDimprofileStyleAsAecProfileStyleDimprofileAsAecProfile

Setdoc=AecArchBaseApplication.ActiveDocumentSetcProfileStyles=doc.ProfileStylesIfcProfileStyles.Count>0ThenSetprofileStyle=cProfileStyles.Item(0)Setprofile=profileStyle.profileMsgBox"ProfileCentroid:"&profile.Centroid(0)&","&profile.Centroid(1),_vbInformation,"CentroidExample"ElseMsgBox"NoAECProfilesinthedrawing",vbInformation,"CentroidExample"EndIf

EndSub

ClearExampleSubExample_Clear_AecProfile()

'ThisexamplecopiesaprofileandusestheClearmethodto'removealltheringsfromthenewcopy.'Theexamplelooksforaprofilestylenamed'"Hinged-Double-FullLite."Ifyoudonothavethisstyle'inthecurrentdrawing,changethenameofthestyletoone'thatexistsinyourdrawing.

DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationDimprofileStyleAsAecProfileStyleDimprofileAsNewAecProfileDimcopied_profileAsNewAecProfileDimprofileNameAsStringDimmsgAsStringapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getthespecifiedprofilestyle.OnErrorResumeNextprofileName="Hinged-Double-FullLite"SetprofileStyle=doc.ProfileStyles.Item(profileName)'Ifanerroroccurred,theprofileprobablydoesn'texist.IfErr.Number0ThenMsgBox"Profile"&profileName&"doesnotexist.",vbExclamation,"ClearExample"ExitSubEndIf

'SetanAecProfileobjecttothestyleyouretrieved.Setprofile=profileStyle.profile

'Copytheprofile.copied_profile.CopyFromprofilemsg="Copiedprofilehad"&copied_profile.Rings.count&"rings."&vbCrLf'RemovetheringsinthecopiedprofileusingtheClearmethod.copied_profile.Clearmsg=msg&"AfterClear,thecopiedprofilehas"&copied_profile.Rings.count&"rings."&vbCrLfMsgBoxmsg,vbInformation,"ClearExample"

EndSub

EndSub

ContainsExampleSubExample_Contains()

'ThisexamplewillcheckifanAecRingcontainsanotherAecRing.

OnErrorResumeNextDimpointList1(0To9)AsDoubleDimpointList2(0To9)AsDoublepointList1(0)=0:pointList1(1)=0pointList1(2)=1:pointList1(3)=0pointList1(4)=1:pointList1(5)=1pointList1(6)=0:pointList1(7)=1pointList1(8)=0:pointList1(9)=0

pointList1(0)=0.25:pointList1(1)=0.25pointList1(2)=0.75:pointList1(3)=0.25pointList1(4)=0.75:pointList1(5)=0.75pointList1(6)=0.25:pointList1(7)=0.75pointList1(8)=0.25:pointList1(9)=0.25

Dimring1AsAecRingDimring2AsAecRingDimprofile1AsNewAecProfileDimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleDimprofileAsAecProfile

Setcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("ContainsRing")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("ContainsRing")EndIfSetring1=profile1.Rings.AddSetring2=profile1.Rings.Add

ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)MsgBox"Ring1containsRing2is:"&ring1.Contains(ring2)

EndSub

ContourLinesPerSurfaceExampleSubExample_ContourLinesPerSurface()'Thisexamplereturnsthecurrentsettingof'ContourLinesPerSurface.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrContourLinesPerSurfaceAsIntegerDimnewContourLinesPerSurfaceAsInteger'RetrievethecurrentContourLinesPerSurfacevaluecurrContourLinesPerSurface=ThisDrawing.preferences.ContourLinesPerSurfaceMsgBox"ThecurrentvalueforContourLinesPerSurfaceis"&currContourLinesPerSurface,vbInformation,"ContourLinesPerSurfaceExample"'ChangethevalueforContourLinesPerSurfacenewContourLinesPerSurface=2001ThisDrawing.preferences.ContourLinesPerSurface=newContourLinesPerSurfaceMsgBox"ThenewvalueforContourLinesPerSurfaceis"&newContourLinesPerSurface,vbInformation,"ContourLinesPerSurfaceExample"'ResetContourLinesPerSurfacetoitsoriginalvalueThisDrawing.preferences.ContourLinesPerSurface=currContourLinesPerSurfaceMsgBox"TheContourLinesPerSurfacevalueisresetto"&currContourLinesPerSurface,vbInformation,"ContourLinesPerSurfaceExample"EndSub

ConvertToCurrentAreaDisplayExampleSubExample_ConvertToCurrentAreaDisplay()

'ThisexamplereturnsthevalueofConvertToCurrentAreaDisplay

'forthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Settheareadisplayunitstosquareyards

dbPref.AreaDisplayUnit=aecUnitSquareYard

DimSourceAreaAsDouble

DimTargetAreaAsDouble

SourceArea=36.0*36.0'Squareunits,assumesdrawingsettoinchunits

TargetArea=dbPref.ConvertToCurrentAreaDisplay(SourceArea)

MsgBox"Theareatoconvertis"&sourcearea&"squareinches."&vbCrLf&_

"TheAreaDisplayUnitissettosquareyard."&vbCrLf&_

"ThevalueforConvertToCurrentAreaDisplayis"&TargetArea&"squareyards.",_

vbInformation,"ConvertToCurrentAreaDisplayExample"

EndSub

ConvertToCurrentVolumeDisplayExampleSubExample_ConvertToCurrentVolumeDisplay()

'ThisexamplereturnsthevalueofConvertToCurrentVolumeDisplay

'forthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Setthevolumedisplayunitstocubicyards

dbPref.VolumeDisplayUnit=aecUnitCubicYard

DimSourceAreaAsDouble

DimTargetAreaAsDouble

SourceArea=36#*36#*36#'Cubicinches

TargetArea=dbPref.ConvertToCurrentVolumeDisplay(SourceArea)

MsgBox"Theareatoconvertis"&SourceArea&"cubicinches."&vbCrLf&_

"TheVolumeDisplayUnitissettocubicyard."&vbCrLf&_

"ThevalueforConvertToCurrentVolumeDisplayis"&TargetArea&""&dbpref.VolumeSuffix,_

vbInformation,"ConvertToCurrentVolumeDisplayExample"

EndSub

CoordinatePrecisionExampleSubExample_CoordinatePrecision()

'ThisexamplereturnstheCoordinatePrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforCoordinatePrecisionis:"&dbPref.CoordinatePrecision,_

vbInformation,"CoordinatePrecisionExample"

EndSub

CopyExampleSubExample_Copy()'Thisexamplecreatesacircleandthencopies'thatcircle.Thenewcircleisthenmoved'andcoloredred.'CreatethecircleDimcircleObjAsAcadCircleDimcenter(0To2)AsDoubleDimradiusAsDoublecenter(0)=2#:center(1)=2#:center(2)=0#radius=0.5SetcircleObj=ThisDrawing.ModelSpace.AddCircle(center,radius)ZoomAllMsgBox"Copythecircle.",,"CopyExample"'CopythecircleDimcopyCircleObjAsAcadCircleSetcopyCircleObj=circleObj.Copy()'DefinethepointsthatmakeupthemovevectorDimpoint1(0To2)AsDoubleDimpoint2(0To2)AsDoublepoint1(0)=0:point1(1)=0:point1(2)=0point2(0)=2:point2(1)=0:point2(2)=0MsgBox"Movethecopiedcircle2unitsintheXdirection.",,"CopyExample"'MovethecircleandcoloritcopyCircleObj.Movepoint1,point2copyCircleObj.Color=acRedZoomAllMsgBox"Movecompleted.",,"CopyExample"EndSub

CopyFromExampleSubExample_CopyFrom_AecProfile()

'ThisexamplecopiesanexistingprofileusingtheCopyFrommethod.'Theexamplelooksforaprofilestylenamed'"Hinged-Double-FullLite."Ifyoudonothavethisstyle'inthecurrentdrawing,changethenameofthestyletoone'thatexistsinyourdrawing.

DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationDimprofileStyleAsAecProfileStyleDimprofileAsNewAecProfileDimcopied_profileAsNewAecProfileDimprofileNameAsStringDimmsgAsStringapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getthespecifiedprofilestyle.OnErrorResumeNextprofileName="Hinged-Double-FullLite"SetprofileStyle=doc.ProfileStyles.Item(profileName)'Ifanerroroccurred,theprofileprobablydoesn'texist.IfErr.Number0ThenMsgBox"Profile"&profileName&"doesnotexist.",vbExclamation,"CopyFromExample"ExitSubEndIf

'SetanAecProfileobjecttothestyleyouretrieved.Setprofile=profileStyle.profile'Copytheprofile.

copied_profile.CopyFromprofile

msg="Copiedprofilehad"&copied_profile.Rings.count&"rings."&vbCrLfMsgBoxmsg,vbInformation,"CopyFromExample"

EndSub

CopyObjectsExampleSubExample_CopyObjects()'ThisexamplecreatesaCircleobjectandusestheCopyObjects'methodtomakeacopyofthenewCircle.

DimDOC1AsAcadDocumentDimcircleObj1AsAcadCircle,circleObj2AsAcadCircleDimcircleObj1CopyAsAcadCircle,circleObj2CopyAsAcadCircleDimcenterPoint(0To2)AsDoubleDimradius1AsDouble,radius2AsDoubleDimradius1CopyAsDouble,radius2CopyAsDoubleDimobjCollection(0To1)AsObjectDimretObjectsAsVariant'DefinetheCircleobjectcenterPoint(0)=0:centerPoint(1)=0:centerPoint(2)=0radius1=5#:radius2=7#radius1Copy=1#:radius2Copy=2#'CreateanewdrawingSetDOC1=Documents.Add'AddtwocirclestothedrawingSetcircleObj1=DOC1.ModelSpace.AddCircle(centerPoint,radius1)SetcircleObj2=DOC1.ModelSpace.AddCircle(centerPoint,radius2)ThisDrawing.Application.ZoomAll'Copyobjects''FirstputtheobjectstobecopiedintoaformcompatiblewithCopyObjectsSetobjCollection(0)=circleObj1SetobjCollection(1)=circleObj2'Copyobjectandgetbackacollectionofthenewobjects(copies)retObjects=DOC1.CopyObjects(objCollection)'Getnewlycreatedobjectandapplynewpropertiestothecopies

SetcircleObj1Copy=retObjects(0)SetcircleObj2Copy=retObjects(1)circleObj1Copy.radius=radius1CopycircleObj1Copy.Color=acRedcircleObj2Copy.radius=radius2CopycircleObj2Copy.Color=acRedThisDrawing.Application.ZoomAllMsgBox"Circlescopied."EndSub

CountExampleSubExample_Count()'ThisexamplewilldisplaythenumberofMultiViewBlockStylesinthecurrentdrawing.

DimdocAsAecArchBaseDocumentDimcMvBlockStylesAsAecMVBlockStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcMvBlockStyles=doc.MVBlockStylesMsgBox"NumberofMVBlockStylesinthisdrawingis:"&cMvBlockStyles.count,vbInformation,"CountExample"

EndSub

DatabaseExampleSubExample_Database()'ThisexamplereferencestheDatabaseobjectobtainedfromthemodelspace.'WethendisplayinformationfromtheDatabaseobject.DimDatabaseAsAcadDatabase'AttachtoDatabaseobjectSetDatabase=ThisDrawing.ModelSpace.DatabaseMsgBox"WenowhaveaccesstothepropertiesandmethodsoftheDatabaseobject!"'RetrievethenumberofBlocksinthisdatabaseMsgBox"ThenumberofBlocksinthisdatabaseis:"&Database.Blocks.count

'ReleaseobjectSetDatabase=NothingMsgBox"TheDatabaseobjecthasbeenreleased!"EndSub

DatabaseScaleExampleSubExample_DatabaseScale()

'ThisexamplereturnstheDatabaseScalesettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforDatabaseScaleis:"&dbPref.DatabaseScale,_

vbInformation,"DatabaseScaleExample"

EndSub

DeleteExampleSubExample_Delete()

'Thisexamplepromptsuserstoselectadrawingobject,then'deletesthatobject.ItthenissuestheUndocommandto'reversethedelete.

DimobjAsAcadObjectDimentAsAecEntityDimpickPtAsVariant

OnErrorResumeNextThisDrawing.Utility.GetEntityobj,pickPt,"PleaseselectanAECobject:"&vbCrLfOnErrorGoTo0'VerifythatanAECobjectwasselected.IfobjIsNothingThenMsgBox"Nothingselected.",vbExclamation,"DeleteExample"ExitSubElseIfNot(TypeOfobjIsAecEntity)ThenMsgBox"TheobjectyouselectedisnotanAECobject.",vbExclamation,"DeleteExample"ExitSubElseSetent=objSetobj=NothingEndIf

'Deletetheselectedobject.ent.DeleteThisDrawing.Regen(acActiveViewport)MsgBox"Theselectedobjectwastemporarilydeleted.",vbExclamation,"DeleteExample"

'Undothedelete.ThisDrawing.SendCommand"_undo"&vbCr&vbCr

EndSub

DepthExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

lAecMassElement

SubExample_Depth_AecLayoutGrid2D()'Thisexampledisplaysthedepthofa2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimmsgAsStringDimangAsStringAsString'Askusertoselectagrid.ThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetobj=Nothing'Ifthegridisradial,thenDepthisanangle,inradians.'Thereisnowaytocheckthegridtype,becausethereis'noShapepropertyexposed.Sothisexampledisplaysboth'therawvalue(tothreedecimalplaces)andthevaluein'degrees(convertedfromradians).msg=msg&"Depthis"&Format(grid.Depth,"0.000")'Converttheradianvaluetodegreeswithaprecisionof2.angAsString=ThisDrawing.Utility.AngleToString(grid.Depth,acDegrees,2)msg=msg&"(ifradial,thisis"&angAsString&"degrees)"&vbCrLf

MsgBoxmsg,vbInformation,"DepthExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"DepthExample"EndIf

EndSub

SubExample_Depth_AecLayoutGrid3D()

'Thisexampledisplaysthedepthofa3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridDepthis:"&grid.Depth,vbInformation,"DepthExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"DepthExample"EndIf

EndSub

SubExample_Depth_AecMassElement()

'ThisexampleshowsthesizeofthemasselementinitsrelativeYdirection

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Depthis:"&mass.Depth,vbInformation,"DepthExample"EndIf

NextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"DepthExample"EndIf

EndSub

DescriptionExampleSubExample_Description()

'ThisexamplewilldisplaythedescriptionofanAECEntity.

DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectAECObject"IfTypeOfobjIsAecGeoThenDimAecGeoAsAecGeo'AecGeoisthebaseclassforallthedrawnAECEntitiesSetAecGeo=objMsgBox"AECDescription:"&AecGeo.Description,vbInformation,"DescriptionExample"ElseMsgBox"NoAECEntityselected",vbInformation,"DescriptionExample"EndIf

EndSub

DictionariesExampleSubExample_Dictionaries()'Thisexamplefindsthecurrentdictionarycollectionand'addsanewdictionarytothatcollection.DimdictAsAcadDictionarySetdict=ThisDrawing.Dictionaries.Add("TEST")MsgBox"Anewdictionarycalled"&dict.name&"hasbeenaddedtothedictionariescollection.",vbInformation,"DictionariesExample"EndSub

DimStylesExampleSubExample_DimStyles()'Thisexampleaddsanewdimensionstyle.DimdimStyleAsAcadDimStyleSetdimStyle=ThisDrawing.DimStyles.Add("TEST")MsgBox"Anewdimensionstylecalled"&dimStyle.name&"hasbeenaddedtotheDimstylescollection.",vbInformation,"DimstylesExample"EndSub

DisplaySilhouetteExampleSubExample_DisplaySilhouette()'Thisexamplereturnsthecurrentsettingof'DisplaySilhouette.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrDisplaySilhouetteAsBoolean'RetrievethecurrentDisplaySilhouettevaluecurrDisplaySilhouette=ThisDrawing.preferences.DisplaySilhouetteMsgBox"ThecurrentvalueforDisplaySilhouetteis"&preferences.DisplaySilhouette,vbInformation,"DisplaySilhouetteExample"'ChangethevalueforDisplaySilhouetteThisDrawing.preferences.DisplaySilhouette=Not(currDisplaySilhouette)MsgBox"ThenewvalueforDisplaySilhouetteis"&preferences.DisplaySilhouette,vbInformation,"DisplaySilhouetteExample"'ResetDisplaySilhouettetoitsoriginalvalueThisDrawing.preferences.DisplaySilhouette=currDisplaySilhouetteMsgBox"TheDisplaySilhouettevalueisresetto"&preferences.DisplaySilhouette,vbInformation,"DisplaySilhouetteExample"EndSub

DocumentExampleSubExample_Document()'Thisexamplecreatesacircleinmodelspaceandthen'findsthenameofthedocumentthatthecircleresidesin.DimcircleObjAsAcadCircleDimcenterPoint(0To2)AsDoubleDimradiusAsDouble'DefinethecirclecenterPoint(0)=0#:centerPoint(1)=0#:centerPoint(2)=0#radius=5#'CreatetheCircleobjectinmodelspaceSetcircleObj=ThisDrawing.ModelSpace.AddCircle(centerPoint,radius)ZoomAll'FindthedocumentnameforthecircleDimcurrDocAsAcadDocumentSetcurrDoc=circleObj.DocumentMsgBox"Thecircleresidesin:"&currDoc.nameEndSub

EdgeWidthExampleSubExample_EdgeWidth()

'ThisexamplewilldisplaytheedgewidthoftheselectedAecPolygon

DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectAecPolygon"IfTypeOfobjIsAecPolygonThenDimpolygonAsAecPolygonDimpolygonStyleAsAecPolygonStyleSetpolygon=objSetpolygonStyle=polygon.StyleMsgBox"PolygonEdgeWidth="&polygonStyle.EdgeWidth,vbInformation,"EdgeWidthExample"ElseMsgBox"NoAecPolygonSelected",vbInformation,"EdgeWidthExample"EndIf

EndSub

EdgeWidthJustifyExampleSubExample_EdgeWidthJustify()

'ThisexamplewilldisplaytheedgewidthjustificationoftheselectedAecPolygon

DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectAecPolygon"IfTypeOfobjIsAecPolygonThenDimpolygonAsAecPolygonDimpolygonStyleAsAecPolygonStyleSetpolygon=objSetpolygonStyle=polygon.StyleSelectCasepolygonStyle.EdgeWidthJustifyCaseaecPolygonEdgeWidthJustificationCenterMsgBox"PolygonEdgeWidthJustifyCENTER",vbInformation,"EdgeWidthJustifyExample"CaseaecPolygonEdgeWidthJustificationInMsgBox"PolygonEdgeWidthJustifyisIN",vbInformation,"EdgeWidthJustifyExample"CaseaecPolygonEdgeWidthJustificationOutMsgBox"PolygonEdgeWidthJustifyisOUT",vbInformation,"EdgeWidthJustifyExample"EndSelectElseMsgBox"NoAecPolygonSelected",vbInformation,"EdgeWidthJustifyExample"EndIf

EndSub

ElevationModelSpaceExampleSubExample_ElevationModelSpace()'Thisexamplechangesthemodelspaceelevationofthecurrentdrawing'andthenresetsittotheoriginalvalueagain.DimcurrElevationAsDoublecurrElevation=ThisDrawing.ElevationModelSpaceMsgBox"Thecurrentmodelspaceelevationis"&ThisDrawing.ElevationModelSpace,vbInformation,"ElevationModelSpaceExample"'ChangetheelevationThisDrawing.ElevationModelSpace=currElevation+2MsgBox"Thenewmodelspaceelevationis"&ThisDrawing.ElevationModelSpace,vbInformation,"ElevationModelSpaceExample"'ResettheelevationtoitsoriginalvalueThisDrawing.ElevationModelSpace=currElevationMsgBox"Themodelspaceelevationisresetto"&ThisDrawing.ElevationModelSpace,vbInformation,"ElevationModelSpaceExample"

EndSub

ElevationPaperSpaceExampleSubExample_ElevationPaperSpace()'Thisexamplechangesthepaperspaceelevationofthecurrentdrawing'andthenresetsittotheoriginalvalueagain.DimcurrElevationAsDoublecurrElevation=ThisDrawing.ElevationPaperSpaceMsgBox"Thecurrentpaperspaceelevationis"&ThisDrawing.ElevationPaperSpace,vbInformation,"ElevationpaperSpaceExample"'ChangetheelevationThisDrawing.ElevationPaperSpace=currElevation+2MsgBox"Thenewpaperspaceelevationis"&ThisDrawing.ElevationPaperSpace,vbInformation,"ElevationpaperSpaceExample"'ResettheelevationtoitsoriginalvalueThisDrawing.ElevationPaperSpace=currElevationMsgBox"Thepaperspaceelevationisresetto"&ThisDrawing.ElevationPaperSpace,vbInformation,"ElevationPaperSpaceExample"

EndSub

ElevationPrecisionExampleSubExample_ElevationPrecision()

'ThisexamplereturnstheElevationPrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforElevationPrecisionis:"&dbPref.ElevationPrecision,_

vbInformation,"ElevationPrecisionExample"

EndSub

EndOffsetExampleSubExample_EndOffset()

'ThisexampledisplaystheendoffsetofaselectedAECLayoutCurveObjectDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"EndOffsetis:"&layoutCurve.EndOffset,vbInformation,"EndOffsetExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"EndOffsetExample"EndIf

EndSub

ExpandKeyExampleSubExample_ExpandKey()

'Thisexampleshowshowtoexpandalayerkeyforthecurrentlayerstandard

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)

MsgBox"LayerKeyWALLexpandsto:"&layerKeyStyle.ExpandKey("WALL"),_vbInformation,"ExpandExample"

EndSub

ExportFreeFormExampleSubExample_ExportFreeForm()

'Thisexamplecreatesamasselement,afterpromptingusers'foritsinsertionpoint,andthenexportsthemasselement'boundariestoafile.'YoucanrunthiscodeinconjunctionwithExample_ImportFreeForm,'whichimportsthesavedboundaries.

DimmassElementAsAecMassElementDimobjAsAcadObjectDimcenter_at_originAsBooleanDimobject_selectedAsBooleanobject_selected=False'Createanewmasselementwithapyramidshape.SetmassElement=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")massElement.Type=aecMassElementTypePyramid'Specifyalocationforthemasselement.pt=ThisDrawing.Utility.GetPoint(,"Selecttheinsertionpoint:")IfErr.Number0ThenMsgBox("errorwhengettingapoint."&vbCrLf)ExitSubEndIfmassElement.Location=ptmassElement.Rotation=0'Setthepyramid'sdimensionsto12'by12'by12'massElement.Width=144massElement.Depth=144massElement.Height=144'Indicatethatoriginalcoordinatesoftheboundary'representationaretobesaved.

center_at_origin=True'Exportthemasselementboundaries.massElement.ExportFreeForm"c:\temp\freeform-massElement",center_at_origin

EndSub

FacetDeviationExampleSubExample_FacetDeviation()

'ThisexampledisplaystheFacetDeviationsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThesettingforFacetDeviationis:"&dbPref.FacetDeviation,_

vbInformation,"FacetDeviationExample"

EndSub

FlipXExampleSubExample_FlipX()

'ThisexamplewillflipanobjectthatusesanAecAnchorEntToCurveaboutthecurve'sXaxis.

DimobjAsAcadObjectDimpntAsVariantThisDrawing.Utility.GetEntityobj,pnt,vbCrLf&"SelectaGeoanchoredtoaCurve"

IfTypeOfobjIsAecGeoThenDimgeoAsAecGeoSetgeo=objDimanchorAsAecAnchorSetanchor=geo.GetAnchorIfTypeOfanchorIsAecAnchorEntToCurveThenDimcurveAnchorAsAecAnchorEntToCurveSetcurveAnchor=anchorIfcurveAnchor.FlipXThenMsgBox"FlipXisTrue",vbInformation,"FlipXExample"ElseMsgBox"FlipXisFalse",vbInformation,"FlipXExample"EndIf'ThefollowinglinewillflipthecurrentanchorcurveAnchor.FlipX=NotcurveAnchor.FlipXElseMsgBox"AnchornotoftypeAecAnchorEntToCurve",vbExclamation,"FlipXExample"EndIfElseMsgBox"NotanAecGeoObject",vbExclamation,"FlipXExample"EndIf

EndSub

FlipYExampleSubExample_FlipY()

'ThisexamplewillflipanobjectthatusesanAecAnchorEntToCurveaboutthecurve'sYaxis.

DimobjAsAcadObjectDimpntAsVariantThisDrawing.Utility.GetEntityobj,pnt,vbCrLf&"SelectaGeoanchoredtoaCurve"

IfTypeOfobjIsAecGeoThenDimgeoAsAecGeoSetgeo=objDimanchorAsAecAnchorSetanchor=geo.GetAnchorIfTypeOfanchorIsAecAnchorEntToCurveThenDimcurveAnchorAsAecAnchorEntToCurveSetcurveAnchor=anchorIfcurveAnchor.FlipYThenMsgBox"FlipYisTrue",vbInformation,"FlipYExample"ElseMsgBox"FlipYisFalse",vbInformation,"FlipYExample"EndIf'ThefollowinglinewillflipthecurrentanchorcurveAnchor.FlipY=NotcurveAnchor.FlipYElseMsgBox"AnchornotoftypeAecAnchorEntToCurve",vbExclamation,"FlipYExample"EndIfElseMsgBox"NotanAecGeoObject",vbExclamation,"FlipYExample"EndIf

EndSub

FlipZExampleSubExample_FlipZ()

'ThisexamplewillflipanobjectthatusesanAecAnchorEntToCurveaboutthecurve'sZaxis.

DimobjAsAcadObjectDimpntAsVariantThisDrawing.Utility.GetEntityobj,pnt,vbCrLf&"SelectaGeoanchoredtoaCurve"

IfTypeOfobjIsAecGeoThenDimgeoAsAecGeoSetgeo=objDimanchorAsAecAnchorSetanchor=geo.GetAnchorIfTypeOfanchorIsAecAnchorEntToCurveThenDimcurveAnchorAsAecAnchorEntToCurveSetcurveAnchor=anchorIfcurveAnchor.FlipZThenMsgBox"FlipZisTrue",vbInformation,"FlipZExample"ElseMsgBox"FlipZisFalse",vbInformation,"FlipZExample"EndIf'ThefollowinglinewillflipthecurrentanchorcurveAnchor.FlipZ=NotcurveAnchor.FlipZElseMsgBox"AnchornotoftypeAecAnchorEntToCurve",vbExclamation,"FlipZExample"EndIfElseMsgBox"NotanAecGeoObject",vbExclamation,"FlipZExample"EndIf

EndSub

FromPointsExampleSubExample_FromPoints()

'Thisexamplewillmakeanewprofilefromasetofpoints.

OnErrorResumeNextDimpointList(0To7)AsDoublepointList(0)=0.5:pointList(1)=0.5pointList(2)=0.067:pointList(3)=-0.25pointList(4)=0.933:pointList(5)=-0.25pointList(6)=0.5:pointList(7)=0.5

DimringAsAecRingDimprofileAsNewAecProfile

DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleSetcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("FromPoints")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("FromPoints")EndIfSetring=profile.Rings.Add

ring.FromPointspointListSetprofileStyle.profile=profile

EndSub

FromPolylineExampleSubExample_FromPolyline()

'ThisexamplecreatesAECProfilefroma2DPolyline.

DimplineObjAsAcadPolyline

Dimpoints(0To14)AsDouble

'Definethe2Dpolylinepoints

'The3rdelementisignored

points(0)=1:points(1)=1:points(2)=0:

points(3)=1:points(4)=2:points(5)=0:

points(6)=2:points(7)=2:points(8)=0:

points(9)=3:points(10)=2:points(11)=0:

points(12)=4:points(13)=4:points(14)=0:

'Createa2DPolylineobjectinmodelspace

SetplineObj=ThisDrawing.ModelSpace.AddPolyline(points)

OnErrorResumeNext

DimringAsAecRingDimprofileAsNewAecProfile

DimdocAsAecArchBaseDocument

Setdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyle

Setcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("FromPolyline")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("FromPolyline")EndIfSetring=profile.Rings.Add

ring.FromPolylineplineObj

plineObj.deleteSetprofileStyle.profile=profile

EndSub

GenerateLayerExampleSubExample_GenerateLayer()'Thisexampleshowshowtogeneratealayerwiththecurrentlayerstandard

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)

DimlayerAsAcadLayerSetlayer=layerKeyStyle.GenerateLayer("WALL")MsgBox"LayerKeyWALLgeneratedlayer:"&layer.Name_vbInformation,"ExpandExample"

EndSub

GetAnchorExampleSubExample_GetAnchor()

'ThisexamplewillgettheanchorattachedtoanAECEntity.DimentAsAcadEntityDimgeoAsAecGeoDimptAsVariantDimanchorAsAecAnchorThisDrawing.Utility.GetEntityent,pt,"Selectedanchoredobject"IfTypeOfentIsAecGeoThenSetgeo=entSetanchor=geo.GetAnchorIfanchorIsNothingThenMsgBox"AECEntityisnotanchored",vbInformation,"GetAnchorExample"ElseMsgBox"AECEntityisanchoredwithan"&anchor.ObjectName&"object",vbInformation,"GetAnchorExample"EndIfElseMsgBox"AECEntitynotselected",vbInformation,"GetAnchorExample"EndIf

EndSub

GetBoundingBoxExampleSubExample_GetBoundingBox()'Thisexamplecreatesalineinmodelspace.Itthenfindsthe'boundingboxforthelineanddisplaysthecornersofthebox.DimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoubleDimlineObjAsAcadLine

'CreatetheLineobjectinmodelspacestartPoint(0)=2#:startPoint(1)=2#:startPoint(2)=0#endPoint(0)=4#:endPoint(1)=4#:endPoint(2)=0#SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)ZoomAllDimminExtAsVariantDimmaxExtAsVariant'Returntheboundingboxforthelineandreturntheminimum'andmaximumextentsoftheboxintheminExtandmaxExtvariables.lineObj.GetBoundingBoxminExt,maxExt'PrinttheminandmaxextentsMsgBox"Theextentsoftheboundingboxforthelineare:"&vbCrLf_&"MinExtent:"&minExt(0)&","&minExt(1)&","&minExt(2)_&vbCrLf&"MaxExtent:"&maxExt(0)&","&maxExt(1)&","&maxExt(2),vbInformation,"GetBoundingBoxExample"EndSub

GetExtensionDictionaryExampleSubExample_GetExtensionDictionary()'ThisexamplecreatesaCircleobjectinmodelspaceand'addsanewExtensionDictionarytotheCircleobjectDimEDictionaryAsAcadDictionaryDimcircleObjAsAcadCircleDimcenterPoint(0To2)AsDoubleDimradiusAsDouble'DefinetheCircleobjectcenterPoint(0)=0:centerPoint(1)=0:centerPoint(2)=0radius=5#'CreatetheCircleobjectinmodelspaceSetcircleObj=ThisDrawing.ModelSpace.AddCircle(centerPoint,radius)

ThisDrawing.Application.ZoomAllMsgBox"CircleobjectExtensionDictionarystatebefore:"&circleObj.HasExtensionDictionary'CreateanExtensionDictionaryforthenewCircleSetEDictionary=circleObj.GetExtensionDictionaryMsgBox"CircleobjectExtensionDictionarystateafter:"&circleObj.HasExtensionDictionaryEndSub

GetXDataExampleSubExample_GetXData()'Thisexamplecreatesalineandattachesextendeddatatothatline.'CreatethelineDimlineObjAsAcadLineDimstartPt(0To2)AsDouble,endPt(0To2)AsDoublestartPt(0)=1#:startPt(1)=1#:startPt(2)=0#endPt(0)=5#:endPt(1)=5#:endPt(2)=0#SetlineObj=ThisDrawing.ModelSpace.AddLine(startPt,endPt)ZoomAll

'Initializeallthexdatavalues.Notethatfirstdatainthelistshouldbe'applicationnameandfirstdatatypecodeshouldbe1001DimDataType(0To9)AsIntegerDimData(0To9)AsVariantDimreals3(0To2)AsDoubleDimworldPos(0To2)AsDoubleDataType(0)=1001:Data(0)="Test_Application"DataType(1)=1000:Data(1)="Thisisatestforxdata"

DataType(2)=1003:Data(2)="0"'layerDataType(3)=1040:Data(3)=1.23479137438413E+40'realDataType(4)=1041:Data(4)=1237324938'distanceDataType(5)=1070:Data(5)=32767'16bitIntegerDataType(6)=1071:Data(6)=32767'32bitIntegerDataType(7)=1042:Data(7)=10'scaleFactor

reals3(0)=-2.95:reals3(1)=100:reals3(2)=-20DataType(8)=1010:Data(8)=reals3'realworldPos(0)=4:worldPos(1)=400.99999999:worldPos(2)=2.798989DataType(9)=1011:Data(9)=worldPos'worldspaceposition'AttachthexdatatothelinelineObj.SetXDataDataType,Data

'ReturnthexdataforthelineDimxdataOutAsVariantDimxtypeOutAsVariantlineObj.GetXData"",xtypeOut,xdataOutEndSub

GroupsExampleSubExample_Groups()'ThisexamplefindsthecurrentGroupscollectionand'addsanewgrouptothatcollection.DimgroupCollAsAcadGroupsSetgroupColl=ThisDrawing.Groups'Createadimensionstylenamed"TEST"incurrentdrawingDimtestGroupAsAcadGroupSettestGroup=groupColl.Add("TEST")MsgBox"Anewgroupcalled"&testGroup.name&"hasbeenaddedtotheGroupscollection.",vbInformation,"GroupsExample"EndSub

HandleExampleSubExample_Handle()'Thisexamplecreatesseveralobjectsinmodelspace.'Ittheniteratesthroughmodelspaceanddisplaysthe'Handleforeachobjectfound.'CreateaRayobjectinmodelspaceDimrayObjAsAcadRayDimbasePoint(0To2)AsDoubleDimSecondPoint(0To2)AsDoublebasePoint(0)=3#:basePoint(1)=3#:basePoint(2)=0#SecondPoint(0)=1#:SecondPoint(1)=3#:SecondPoint(2)=0#SetrayObj=ThisDrawing.ModelSpace.AddRay(basePoint,SecondPoint)'CreateapolylineobjectinmodelspaceDimplineObjAsAcadLWPolylineDimpoints(0To5)AsDoublepoints(0)=3:points(1)=7points(2)=9:points(3)=2points(4)=3:points(5)=5SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=True

'CreatealineobjectinmodelspaceDimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoublestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=2:endPoint(1)=2:endPoint(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)'CreateacircleobjectinmodelspaceDimcircObjAsAcadCircleDimcenterPt(0To2)AsDoubleDimradiusAsDoublecenterPt(0)=5:centerPt(1)=3:centerPt(2)=0radius=3

SetcircObj=ThisDrawing.ModelSpace.AddCircle(centerPt,radius)

'CreateanellipseobjectinmodelspaceDimellObjAsAcadEllipseDimmajAxis(0To2)AsDoubleDimcenter(0To2)AsDoubleDimradRatioAsDoublecenter(0)=5#:center(1)=5#:center(2)=0#majAxis(0)=10:majAxis(1)=20#:majAxis(2)=0#radRatio=0.3SetellObj=ThisDrawing.ModelSpace.AddEllipse(center,majAxis,radRatio)

ZoomAll'Iteratethroughthemodelspacecollectionanddisplay'thehandleofeachentityfound.DimentHandleAsStringDimentryAsAcadEntityForEachentryInThisDrawing.ModelSpaceentHandle=entry.handleentry.Highlight(True)MsgBox"Thehandleofthisobjectis"&entHandle,vbInformation,"HandleExample"entry.Highlight(False)NextEndSub

HandleToObjectExampleSubExample_HandleToObject()'Thisexamplecreatesasplineinmodelspace.Itthenreturnsthe'handleforthespline.Thesplineisreturnedfromthehandle,and'thencolored.'CreatethesplineDimsplineObjAsAcadSplineDimstartTan(0To2)AsDoubleDimendTan(0To2)AsDoubleDimfitPoints(0To8)AsDoublestartTan(0)=0.5:startTan(1)=0.5:startTan(2)=0endTan(0)=0.5:endTan(1)=0.5:endTan(2)=0fitPoints(0)=1:fitPoints(1)=1:fitPoints(2)=0fitPoints(3)=5:fitPoints(4)=5:fitPoints(5)=0fitPoints(6)=10:fitPoints(7)=0:fitPoints(8)=0SetsplineObj=ThisDrawing.ModelSpace.AddSpline(fitPoints,startTan,endTan)ZoomAll'FindthehandleofthesplineDimhandleAsIntegerhandle=splineObj.handleMsgBox"ThehandleoftheSplineis:"&splineObj.handle,,"HandleToObjectExample"'FindanobjectfromagivenhandleDimtempObjAsAcadObjectSettempObj=ThisDrawing.HandleToObject(handle)

'NowusethenewlyinitializedobjectvariabletocolortheobjectredtempObj.Color=acRedThisDrawing.RegenTrueMsgBox"TheSplineisnowred.",,"HandleToObjectExample"EndSub

HasExampleSubExample_Has()

'Thisexamplewillcheckthewallstylescollectionforagivenwallstyle.DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcWallStylesAsAecWallStylesSetcWallStyles=doc.WallStylesDimstyleNameAsStringstyleName="Brick"IfcWallStyles.Has(styleName)ThenMsgBox"Wallstyle:'"&styleName&"'indrawing",vbInformation,"HasExample"ElseMsgBox"Wallstyle:'"&styleName&"'notindrawing",vbInformation,"HasExample"EndIf

EndSub

HasExtensionDictionaryExampleSubExample_HasExtensionDictionary()'Thisexamplewilliteratethrougheachobjectinthecurrentdrawingand'determineifthatobjecthasanassociatedExtensionDictionaryDimDrawingObjectAsAcadObjectDimExtensionDictionaryResultsAsString'MakesurethisdrawingcontainsobjectsbeforewecontinueIfThisDrawing.ModelSpace.count=0ThenMsgBox"Therearenoobjectsinthecurrentdrawing."ExitSubEndIfForEachDrawingObjectInThisDrawing.ModelSpace'DetermineifobjectcontainsExtensionDictionarySelectCaseDrawingObject.HasExtensionDictionaryCaseTrueExtensionDictionaryResults=ExtensionDictionaryResults&DrawingObject.ObjectName&"hasanassociatedExtensionDictionary"&vbCrLfCaseFalseExtensionDictionaryResults=ExtensionDictionaryResults&DrawingObject.ObjectName&"doesnothaveanassociatedExtensionDictionary"&vbCrLfEndSelectNextMsgBoxExtensionDictionaryResultsEndSub

HeightExampleExamples:

lAecClipVol

lAecLayoutGrid3D

lAecMassElement

SubExample_Height_AecClipVol()

'Thisexampleshowstheheightoftheuppercutplaneabovethe'buildingelevationlineposition

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Heightis:"&clip.Height,vbInformation,"HeightExample"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"HeightExample"EndIf

EndSub

SubExample_Height_AecLayoutGrid3D()

DimobjectAsObjectDimgridAsAecLayoutGrid3DDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecLayoutGrid3DThencount=count+1Setgrid=objectMsgBox"3DGrid"&count&"Heightis:"&grid.Height,vbInformation,"HeightExample"EndIfNextIfcount=0ThenMsgBox"No3DLayoutGridsPresentinDrawing",vbInformation,"HeightExample"EndIf

EndSub

SubExample_Height_AecMassElement()

'ThisexampleshowsthesizeofthemasselementinitsrelativeZdirection

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Heightis:"&mass.Height,vbInformation,"HeightExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"HeightExample"EndIf

EndSub

HighlightExampleSubExample_Highlight()'Thisexamplecreatesseveralobjectsinmodelspace.'Ittheniteratesthroughmodelspaceandhighlightseach'objectanddisplaysit'sEntityName.'CreateaRayobjectinmodelspaceDimrayObjAsAcadRayDimbasePoint(0To2)AsDoubleDimSecondPoint(0To2)AsDoublebasePoint(0)=3#:basePoint(1)=3#:basePoint(2)=0#SecondPoint(0)=1#:SecondPoint(1)=3#:SecondPoint(2)=0#SetrayObj=ThisDrawing.ModelSpace.AddRay(basePoint,SecondPoint)'CreateapolylineobjectinmodelspaceDimplineObjAsAcadLWPolylineDimpoints(0To5)AsDoublepoints(0)=3:points(1)=7points(2)=9:points(3)=2points(4)=3:points(5)=5SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=True

'CreatealineobjectinmodelspaceDimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoublestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=2:endPoint(1)=2:endPoint(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)'CreateacircleobjectinmodelspaceDimcircObjAsAcadCircleDimcenterPt(0To2)AsDoubleDimradiusAsDoublecenterPt(0)=20:centerPt(1)=30:centerPt(2)=0radius=3

SetcircObj=ThisDrawing.ModelSpace.AddCircle(centerPt,radius)

'CreateanellipseobjectinmodelspaceDimellObjAsAcadEllipseDimmajAxis(0To2)AsDoubleDimcenter(0To2)AsDoubleDimradRatioAsDoublecenter(0)=5#:center(1)=5#:center(2)=0#majAxis(0)=10:majAxis(1)=20#:majAxis(2)=0#radRatio=0.3SetellObj=ThisDrawing.ModelSpace.AddEllipse(center,majAxis,radRatio)

ZoomAll'Iteratethroughthemodelspacecollectionand'highlighteachentity.DimentNameAsStringDimentryAsAcadEntityForEachentryInThisDrawing.ModelSpaceentName=entry.ObjectNameentry.Highlight(True)MsgBox"Thenameofthisobjectis"&entName,vbInformation,"HighlightExample"entry.Highlight(False)NextEndSub

HyperlinksExampleSubExample_HyperLinks()'ThisexamplecreatesaCircleobjectinmodelspaceand'addsanewHyperlinktoitsHyperlinkcollectionDimHyperlinksAsAcadHyperlinksDimHyperlinkAsAcadHyperlinkDimcircleObjAsAcadCircleDimcenterPoint(0To2)AsDoubleDimradiusAsDoubleDimHLListAsString'DefinetheCircleobjectcenterPoint(0)=0:centerPoint(1)=0:centerPoint(2)=0radius=5#'CreatetheCircleobjectinmodelspaceSetcircleObj=ThisDrawing.ModelSpace.AddCircle(centerPoint,radius)

ThisDrawing.Application.ZoomAll'GetreferencetotheCircle'sHyperlinkscollectionSetHyperlinks=circleObj.Hyperlinks'AddanewHyperlinkcompletewithallpropertiesSetHyperlink=Hyperlinks.Add("AutoDesk")Hyperlink.URL="www.autodesk.com"Hyperlink.URLDescription="AutodeskMainSite"Hyperlink.URLNamedLocation="MY_LOCATION"'ReadanddisplayalistofexistingHyperlinksand'theirpropertiesforthisobjectForEachHyperlinkInHyperlinksHLList=HLList&"____________________________________"&vbCrLf'SeparatorHLList=HLList&"URL:"&Hyperlink.URL&vbCrLfHLList=HLList&"URLDescription:"&Hyperlink.URLDescription&vbCrLfHLList=HLList&"URLNamedLocation:"&Hyperlink.URLNamedLocation&vbCrLf

NextMsgBox"Thecirclehas"&Hyperlinks.count&"Hyperlink:"&vbCrLf&HLListEndSub

ImportFreeFormExampleSubExample_ImportFreeForm()

'Thisexampleimportsapreviouslyexportedboundaryrepresentation'ofamasselementandappliesittoafree-formmasselement.'Itpromptsuserstospecifythelocationofthenewmasselement.'YoucanrunthiscodeinconjunctionwithExample_ExportFreeForm'(runExample_ExportFreeFormfirst).

DimmassElementAsAecMassElementDimptAsVariantDimcenter_at_originAsBoolean

'CreateanewmasselementSetmassElement=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'Setthemasselementtypeto"free-form"massElement.Type=aecMassElementTypeFreeForm'Selectalocationforthemasselementpt=ThisDrawing.Utility.GetPoint(,"Selecttheinsertionpoint:")IfErr.Number0ThenMsgBox("errorwhengettingapoint."&vbCrLf)ExitSubEndIfmassElement.Location=pt'UsemasselementLocationasinsertionpoint.center_at_origin=True'Importtheboundaryrepresentation.massElement.ImportFreeForm"c:\temp\freeform-massElement"

EndSub

IndexExampleExamples:

lAecLayerKey

lAecLayerOverrideSetting

lAecLayoutCurveNode

lAecLayoutGrid2DNode

lAecLayoutGrid2DXNode

lAecLayoutGrid2DYNode

lAecLayoutGrid3DNode

lAecLayoutGrid3DXNode

lAecLayoutGrid3DYNode

lAecLayoutGrid3DZNode

lAecRing

lAecViewBlock

SubExample_Index_AecLayerKey()

'Thisexampleshowstheindexofthelayergeneratedbythekey

DimdbAsNewAecBaseDatabaseDimlayerKeyAsAecLayerKeydb.InitThisDrawing.DatabaseSetlayerKey=db.LayerKeyStyles.Item(0).Keys.Item(0)MsgBox"LayerIndex:"&layerKey.Index,vbInformation,"IndexExample"

EndSub

SubExample_Index_AecLayerOverrideSetting()

'Thisexampleshowstheindexoftheoverridesetting

DimdbAsNewAecBaseDatabaseDimsettingAsAecLayerOverrideSettingdb.InitThisDrawing.DatabaseSetsetting=db.LayerKeyStyles.Item(0).overrideSettings.Item(0)MsgBox"SettingIndex:"&setting.Index,vbInformation,"IndexExample"

EndSub

SubExample_Index_AecLayoutCurveNode()

'ThisexampledisplaysthecolorofthenodesownerlayoutcurveDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveDimnodeAsAecLayoutCurveNodeThisDrawing.Utility.GetEntityobj,pt,"SelectaLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objSetnode=layoutCurve.nodes.Item(0)MsgBox"Coloris:"&node.layoutCurve.Color,vbInformation,"LayoutCurveExample"ElseMsgBox"NotaLayoutCurve",vbExclamation,"LayoutCurveExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid2DNode()

'ThisexampledisplaystheindexofalayoutnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"NodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid2DXNode()'ThisexampledisplaystheindexofalayoutXnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"

IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"XNodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid2DYNode()'ThisexampledisplaystheindexofalayoutYnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.YNodes.Item(0)MsgBox"YNodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid3DNode()'Thisexampledisplaystheindexofalayoutnode

DimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"NodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid3DXNode()'ThisexampledisplaystheindexofalayoutXnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"XNodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid3DYNode()'ThisexampledisplaystheindexofalayoutYnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.YNodes.Item(0)MsgBox"YNodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecLayoutGrid3DZNode()'ThisexampledisplaystheindexofalayoutZnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=obj

Setnode=grid.ZNodes.Item(0)MsgBox"ZNodeIndexis:"&node.Index,vbInformation,"IndexExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"IndexExample"EndIf

EndSub

SubExample_Index_AecRing()'ThisexamplewilldisplaytheindexoftheringDimdbAsNewAecBaseDatabaseDimringAsAecRingdb.InitThisDrawing.DatabaseSetring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingIndex:"&ring.Index,vbInformation,"IndexExample"

EndSub

SubExample_Index_AecViewBlock()'Thisexampleshowstheindexofthefirstviewblockofamultiviewblock

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefDimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=obj

SetviewBlocks=blockRef.viewBlocksMsgBox"IndexofViewBlock1:"&viewBlocks.Item(0).Index,vbInformation,"IndexExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"IndexExample"EndIf

EndSub

InitExampleSubExample_Init()

'Thisexampleinitializestheapplicationobject,using'thecurrentdrawing,thenliststhenumberofobjectsin'thedrawing'smodelspace.

DimappAsNewAecBaseApplicationDimdocAsAecBaseDocumentDimnbr_of_objectsAsIntegerDimmsgAsString'Initializetheapplicationobject.app.InitThisDrawing.Application'Accessthecurrentdrawingdatabase.Setdoc=app.ActiveDocument'Getthenumberofobjectsinthedrawing'smodelspace.nbr_of_objects=doc.ModelSpace.Countmsg="Thereare"&nbr_of_objects&"objectsinthisdrawing'smodelspace."MsgBoxmsg,vbInformation,"InitExample"

EndSub

IntersectExampleSubExample_Intersect()

'Thisexamplewilladdmaketwoprofilesfromrings,andintersectthefirstwiththesecond

OnErrorResumeNextDimpointList1(0To9)AsDoubleDimpointList2(0To7)AsDoublepointList1(0)=0:pointList1(1)=0pointList1(2)=1:pointList1(3)=0pointList1(4)=1:pointList1(5)=1pointList1(6)=0:pointList1(7)=1pointList1(8)=0:pointList1(9)=0

pointList2(0)=0.5:pointList2(1)=0.5pointList2(2)=0.067:pointList2(3)=-0.25pointList2(4)=0.933:pointList2(5)=-0.25pointList2(6)=0.5:pointList2(7)=0.5

Dimring1AsAecRingDimring2AsAecRingDimprofile1AsNewAecProfileDimprofile2AsNewAecProfile

DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleSetcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("IntersectRing")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("IntersectRing")EndIfSetring1=profile1.Rings.AddSetring2=profile2.Rings.Add

ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)

profile1.Intersectprofile2

SetprofileStyle.profile=profile1

EndSub

IntersectWithExampleSubExample_IntersectWith()'Thisexamplecreatesalineandcircleandfindsthepointsat'whichtheyintersect.'CreatethelineDimlineObjAsAcadLineDimstartPt(0To2)AsDoubleDimendPt(0To2)AsDoublestartPt(0)=1:startPt(1)=1:startPt(2)=0endPt(0)=5:endPt(1)=5:endPt(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPt,endPt)'CreatethecircleDimcircleObjAsAcadCircleDimcenterPt(0To2)AsDoubleDimradiusAsDoublecenterPt(0)=3:centerPt(1)=3:centerPt(2)=0radius=1SetcircleObj=ThisDrawing.ModelSpace.AddCircle(centerPt,radius)ZoomAll'FindtheintersectionpointsbetweenthelineandthecircleDimintPointsAsVariantintPoints=lineObj.IntersectWith(circleObj,acExtendNone)'PrintalltheintersectionpointsDimIAsInteger,jAsInteger,kAsIntegerDimstrAsStringIfVarType(intPoints)<>vbEmptyThenForI=LBound(intPoints)ToUBound(intPoints)str="IntersectionPoint["&k&"]is:"&intPoints(j)&","&intPoints(j+1)&","&intPoints(j+2)MsgBoxstr,,"IntersectWithExample"str=""I=I+2j=j+3k=k+1

NextEndIfEndSub

ItemExampleSubExample_Item()

'ThisexampleliststhenumberofkeysintheStandard'layerkeystylescollection,andthenliststhenameof'eachlayerkeystylescollectioninthedrawing.Theexample'usesboththestringandintegermethodsofspecifyingthe'indexofanItem.DimappAsNewAecBaseApplicationDimdocAsAecBaseDocumentDimlayerkeystylesAsAecLayerKeyStylesDimkeystyleAsAecLayerKeyStyleDimmsgAsStringapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getthedrawing'scollectionoflayerkeystyles.Setlayerkeystyles=doc.layerkeystylesmsg="NumberofLayerKeyStylesinthisdrawingis:"&layerkeystyles.Count&vbCrLf'Getthestandardlayerkeystyle,ifitexists(itshould!)OnErrorResumeNextSetkeystyle=layerkeystyles.Item("Standard")'ListthenumberofkeysintheStandardlayerkeystyle.IfErrThenmsg=msg&"Standardlayerkeystyledoesnotexistinthisdrawing"Err.ClearElsemsg="Standardlayerkeystylecontains"&keystyle.Keys.Count&"keys."&vbCrLfEndIfOnErrorGoTo0'Loopthroughthelayerkeystylescollection,listingthename'ofeachlayerkeystyleinthecollection.

msg=msg&vbCrLf&"Thelayerkeystylesinthisdrawingare:"&vbCrLfFori=0To(layerkeystyles.Count-1)msg=msg&""&layerkeystyles.Item(i).Name&vbCrLfNextMsgBoxmsg,vbInformation,"ItemExample"

EndSub

KeysExampleSubExample_Keys()

'Thisexampleshowsthehowtogetthelayerkeyfromthelayerkeystyle.

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

<PREclass=Code>

EndSub

LayerExampleSubExample_Layer()

'Thisexampleliststhelayerkeysinthelayerkeystyle'ofthedocument'sstandardlayer.

DimappAsNewAecBaseApplicationDimdocAsAecBaseDocumentDimdbPrefAsAecBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeyDimmsgAsString'Initializetheapplicationobjectandaccessthecurrentdrawing.app.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getthedrawing'scollectionoflayerkeystyles.SetcLayerKeyStyles=doc.layerkeystyles

'Getthepreferencesobject.SetdbPref=doc.Preferences'Identifythelayerstandard.msg="Layerstandardis"&dbPref.LayerStandard_&".Itcontainsthefollowinglayerkeys:"&vbCrLf'Setthelayerkeystyletothecurrentlayerstandard.SetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)'Getthecollectionoflayerkeysinthestyle.SetcLayerKeys=layerKeyStyle.Keys'Loopthroughthecollectionandlistsomepropertiesofeachkey.

ForEachlayerKeyIncLayerKeysmsg=msg&""&layerKey.Name&":"&vbCrLfmsg=msg&"Color-"&layerKey.Color&vbCrLfmsg=msg&"Layer-"&layerKey.Layer&vbCrLfmsg=msg&"LineType-"&layerKey.Linetype&vbCrLfmsg=msg&"Lineweight-"&layerKey.Lineweight&vbCrLfmsg=msg&"Plotstyle-"&layerKey.PlotStyleName&vbCrLfNext

MsgBoxmsg,vbInformation,"LayerExample"

EndSub

LayerFileExampleSubExample_LayerFile()

'ThisexampledisplaystheLayerFilesettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

DimlayerfileAsString

layerfile=dbPref.LayerFile

'Testiflayerfileisset

Iflayerfile=""Then

layerfile="notset"

EndIf

MsgBox"ThecurrentvalueforLayerFileis:"&layerfile,vbInformation,"LayerFileExample"

EndSub

LayerKeyStyleExampleExamples:

lAecLayerKey

lAecLayerKeys

lAecLayerOverrideSetting

lAecLayerOverrideSettings

SubExample_LayerKeyStyle_AecLayerKey()

'Thisexampleshowsthelayerstylegeneratedbythekey

DimdbAsNewAecBaseDatabaseDimlayerKeyAsAecLayerKeydb.InitThisDrawing.DatabaseSetlayerKey=db.LayerKeyStyles.Item(0).Keys.Item(0)MsgBox"LayerStyle:"&layerKey.layerKeyStyle.Name,vbInformation,"LayerKeyStyleExample"

EndSub

SubExample_LayerKeyStyle_AecLayerKeys()

'Thisexampleshowsthenameoftheownerlayerkeystyle

DimdbAsNewAecBaseDatabaseDimlayerKeysAsAecLayerKeysdb.InitThisDrawing.DatabaseSetlayerKeys=db.LayerKeyStyles.Item(0).Keys

MsgBox"LayerKeysOwnerName:"&layerKeys.layerKeyStyle.Name,vbInformation,"LayerKeyStyleExample"

EndSub

SubExample_LayerKeyStyle_AecLayerOverrideSetting()

'Thisexampleshowsthenameoftheowneroftheoverridesetting

DimdbAsNewAecBaseDatabaseDimsettingAsAecLayerOverrideSettingdb.InitThisDrawing.DatabaseSetsetting=db.LayerKeyStyles.Item(0).overrideSettings.Item(0)MsgBox"SettingOwnersName:"&setting.layerKeyStyle.Name,vbInformation,"LayerKeyStyleExample"

EndSub

SubExample_LayerKeyStyle_AecLayerOverrideSettings()

DimdbAsNewAecBaseDatabaseDimoverrideSettingsAsAecLayerOverrideSettingsdb.InitThisDrawing.DatabaseSetoverrideSettings=db.LayerKeyStyles.Item(0).overrideSettingsMsgBox"LayerOverrideSettingsownername:"&overrideSettings.layerKeyStyle.Name,vbInformation,"LayerKeyStyleExample"

EndSub

LayerKeyStylesExampleSubExample_LayerKeyStyles()

'ThisexamplewilldisplaythenumberofLayerKeyStylesinthecurrentdrawing.

DimdocAsAecArchBaseDocumentDimcLayerKeyStylesAsAecLayerKeyStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesMsgBox"NumberofLayerKeyStylesinthisdrawingis:"&cLayerKeyStyles.Count,vbInformation,"LayerKeyStylesExample"

EndSub

LayersExampleSubExample_Layers()'ThisexamplefindsthecurrentLayerscollectionand'addsanewlayertothatcollection.DimlayerCollAsAcadLayersSetlayerColl=ThisDrawing.Layers'Createadimensionstylenamed"TEST"incurrentdrawingDimtestlayerAsAcadLayerSettestlayer=layerColl.Add("TEST")MsgBox"Anewlayercalled"&testlayer.name&"hasbeenaddedtotheLayerscollection.",vbInformation,"LayersExample"EndSub

LayerStandardExampleSubExample_LayerStandard()

'ThisexampledisplaystheLayerStandardsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

DimlaystandardAsString

laystandard=dbPref.layerstandard

'Testiflayerstandardisset

Iflaystandard=""Then

laystandard="notset"

EndIf

MsgBox"ThecurrentvalueforLayerStandardis:"&laystandard,_

vbInformation,"LayerStandardExample"

EndSub

LayoutCurveExampleExamples:

lAecLayoutCurveNode

lAecLayoutCurveNodes

SubExample_LayoutCurve_AecLayoutCurveNode()

'ThisexampledisplaysthecolorofthenodesownerlayoutcurveDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveDimnodeAsAecLayoutCurveNodeThisDrawing.Utility.GetEntityobj,pt,"SelectaLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objSetnode=layoutCurve.nodes.Item(0)MsgBox"Coloris:"&node.layoutCurve.Color,vbInformation,"LayoutCurveExample"ElseMsgBox"NotaLayoutCurve",vbExclamation,"LayoutCurveExample"EndIf

EndSub

SubExample_LayoutCurve_AecLayoutCurveNodes()

'ThisexampledisplaysthecolorofthenodecollectionsownercurveDimobjAsObjectDimptAsVariant

DimlayoutCurveAsAecLayoutCurveDimnodesAsAecLayoutCurveNodesThisDrawing.Utility.GetEntityobj,pt,"SelectaLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objSetnodes=layoutCurve.nodesMsgBox"Coloris:"&nodes.layoutCurve.Color,vbInformation,"LayoutCurveExample"ElseMsgBox"NotaLayoutCurve",vbExclamation,"LayoutCurveExample"EndIf

EndSub

LayoutGrid2DExampleExamples:

lAecLayoutGrid2DNode

lAecLayoutGrid2DNodes

lAecLayoutGrid2DXNode

lAecLayoutGrid2DXNodes

lAecLayoutGrid2DYNode

lAecLayoutGrid2DYNodes

SubExample_LayoutGrid2D_AecLayoutGrid2DNode()

'ThisexampledisplaystheindexofalayoutnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"NodeLayoutGrid'sDepthis:"&node.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

SubExample_LayoutGrid2D_AecLayoutGrid2DNodes()

'ThisexampledisplaystheindexofalayoutnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodesAsAecLayoutGrid2DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnodes=grid.XNodesMsgBox"Nodecollectionownerdepthis:"&nodes.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

SubExample_LayoutGrid2D_AecLayoutGrid2DXNode()

'ThisexampledisplaysthedepthoftheownergridofalayoutxnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"OwnerGridDepthis:"&node.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"Else

MsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

SubExample_LayoutGrid2D_AecLayoutGrid2DXNodes()

'ThisexampledisplaysthedepthoftheownergridofacollectionoflayoutXnodesDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodesAsAecLayoutGrid2DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnodes=grid.XNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

SubExample_LayoutGrid2D_AecLayoutGrid2DYNode()

'ThisexampledisplaysthedepthoftheownergridofalayoutxnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodeAsAecLayoutGrid2DNode

ThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnode=grid.YNodes.Item(0)MsgBox"OwnerGridDepthis:"&node.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

SubExample_LayoutGrid2D_AecLayoutGrid2DYNodes()

'ThisexampledisplaysthedepthoftheownergridofacollectionoflayoutYnodesDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DDimnodesAsAecLayoutGrid2DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetnodes=grid.YNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid2D.Depth,vbInformation,"LayoutGrid2DExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"LayoutGrid2DExample"EndIf

EndSub

LayoutGrid3DExampleExamples:

lAecLayoutGrid3DNode

lAecLayoutGrid3DNodes

lAecLayoutGrid3DXNode

lAecLayoutGrid3DXNodes

lAecLayoutGrid3DYNode

lAecLayoutGrid3DYNodes

lAecLayoutGrid3DZNode

lAecLayoutGrid3DZNodes

SubExample_LayoutGrid3D_AecLayoutGrid3DNode()

'ThisexampledisplaystheindexofalayoutnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"NodeLayoutGrid'sDepthis:"&node.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DNodes()

'ThisexampledisplaystheindexofalayoutnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodesAsAecLayoutGrid3DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnodes=grid.XNodesMsgBox"Nodecollectionownerdepthis:"&nodes.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DXNode()

'ThisexampledisplaysthedepthoftheownergridofalayoutxnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"

IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.XNodes.Item(0)MsgBox"OwnerGridDepthis:"&node.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

SubExample_LayoutGrid3D_AecLayoutGrid3DXNodes()

'ThisexampledisplaysthedepthoftheownergridofacollectionoflayoutXnodesDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodesAsAecLayoutGrid3DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnodes=grid.XNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DYNode()

'ThisexampledisplaysthedepthoftheownergridofalayoutYnode

DimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.YNodes.Item(0)MsgBox"OwnerGridDepthis:"&node.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DYNodes()

'ThisexampledisplaysthedepthoftheownergridofacollectionoflayoutYnodesDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodesAsAecLayoutGrid3DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnodes=grid.YNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DZNode()

'ThisexampledisplaysthedepthoftheownergridofalayoutZnodeDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodeAsAecLayoutGrid3DNodeThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSetnode=grid.ZNodes.Item(0)MsgBox"OwnerGridDepthis:"&node.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

SubExample_LayoutGrid3D_AecLayoutGrid3DZNodes()

'ThisexampledisplaysthedepthoftheownergridofacollectionoflayoutZnodesDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DDimnodesAsAecLayoutGrid3DNodesThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=obj

Setnodes=grid.ZNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf

EndSub

LayoutsExampleSubExample_Layouts()'ThisexamplewillaccesstheLayoutscollectionforthecurrentdrawing'andlistbasicinformationabouttheLayoutsinthedrawing.

DimLayoutsAsAcadLayouts,LayoutAsACADLayoutDimmsgAsString'GetlayoutscollectionfromdocumentobjectSetLayouts=ThisDrawing.Layoutsmsg=vbCrLf&vbCrLf'Startwithaspace'GetthenamesofeverylayoutinthisdrawingForEachLayoutInLayoutsmsg=msg&Layout.name&vbCrLfNext'DisplayalistofavailablelayoutsMsgBox"Thereare"&Layouts.count&"layoutsin"&_ThisDrawing.WindowTitle&":"&msgEndSub

LeaderExtension1ExampleSubExample_LeaderExtension1()

'Thisexamplewillfindthe1stLeaderExtensionforabubbleattachedtoa'columngridDimobjAsAcadObjectDimbubbleAsAecMVBlockRefDimanchorAsAecAnchorDimleaderAnchorAsAecAnchorLeadEntToNodeDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectbubble"IfTypeOfobjIsAecMVBlockRefThenSetbubble=objSetanchor=obj.GetAnchorIfTypeOfanchorIsAecAnchorLeadEntToNodeThenSetleaderAnchor=anchorMsgBox"LeaderExtension1="&leaderAnchor.LeaderExtension1ElseMsgBox"Notanchoredtocolumngrid",vbInformation,"ExampleLeaderExtension1"EndIfElseMsgBox"Notabubble",vbInformation,"ExampleLeaderExtension1"EndIf

EndSub

LeaderExtension2ExampleSubExample_LeaderExtension2()

'Thisexamplewillfindthe2ndLeaderExtensionforabubbleattachedtoa'columngridDimobjAsAcadObjectDimbubbleAsAecMVBlockRefDimanchorAsAecAnchorDimleaderAnchorAsAecAnchorLeadEntToNodeDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectbubble"IfTypeOfobjIsAecMVBlockRefThenSetbubble=objSetanchor=obj.GetAnchorIfTypeOfanchorIsAecAnchorLeadEntToNodeThenSetleaderAnchor=anchorMsgBox"LeaderExtension2="&leaderAnchor.LeaderExtension2ElseMsgBox"Notanchoredtocolumngrid",vbInformation,"ExampleLeaderExtension2"EndIfElseMsgBox"Notabubble",vbInformation,"ExampleLeaderExtension2"EndIf

EndSub

LeftOffsetExampleSubExample_LeftOffset()

'Thisexamplereturnstheleftoffsetoftheselectedobject'tothegridassembly.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimoffsetAsStringOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"LeftOffsetExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0IfanchorIsNothingThenMsgBox"Selectedobjectisnotanchored.",vbExclamation,"LeftOffsetExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"LeftOffsetExample"ElseMsgBox"Leftoffsetofobject:"&anchor.LeftOffset,vbInformation,"LeftOffsetExample"

EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"LeftOffsetExample"EndIf

EndSub

LimitsExampleSubExample_Limits()'Thisexamplefindsthecurrentlimitsforthedrawing.'Itthenchangesthelimitsforthedrawing.Thegrid'isturnedontoshowthelimits.'TurnonthegridfortheactiveviewportThisDrawing.ActiveViewport.GridOn=TrueThisDrawing.ActiveViewport=ThisDrawing.ActiveViewport'FindthecurrentlimitsDimcurrLimitsAsVariantcurrLimits=ThisDrawing.LimitsMsgBox"Thecurrentdrawinglimitsare"&vbCrLf_&"Lower-leftcorner"&ThisDrawing.Limits(0)&","&ThisDrawing.Limits(1)&vbCrLf_&"Upper-rightcorner"&ThisDrawing.Limits(2)&","&ThisDrawing.Limits(3),,"LimitsExample"'ChangethelimitsDimnewLimits(0To3)AsDoublenewLimits(0)=2#:newLimits(1)=2#:newLimits(2)=4#:newLimits(3)=4#ThisDrawing.Limits=newLimitsThisDrawing.RegenacActiveViewportMsgBox"Thenewdrawinglimitsare"&vbCrLf_&"Lower-leftcorner"&ThisDrawing.Limits(0)&","&ThisDrawing.Limits(1)&vbCrLf_&"Upper-rightcorner"&ThisDrawing.Limits(2)&","&ThisDrawing.Limits(3),,"LimitsExample"'ResetthedrawinglimitsThisDrawing.Limits=currLimitsThisDrawing.RegenacActiveViewportMsgBox"Thedrawinglimitshavebeenresetto"&vbCrLf_&"Lower-leftcorner"&ThisDrawing.Limits(0)&","&ThisDrawing.Limits(1)&vbCrLf_&"Upper-rightcorner"&ThisDrawing.Limits(2)&","&ThisDrawing.Limits(3),,"LimitsExample"EndSub

LinearDisplayFormatExampleSubExample_LinearDisplayFormat()

'ThisexamplereturnstheLinearDispalyFormatsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Convertthelineardisplayformattoastring.

DimlinearformatAsString

SelectCasedbPref.LinearDisplayFormat

Case1

linearformat="Scientific"

Case2

linearformat="Decimal"

Case3

linearformat="Engineering"

Case4

linearformat="Architectural"

Case5

linearformat="Fractional"

EndSelect

MsgBox"ThecurrentvalueforLinearDisplayFormatis:"&linearformat,vbInformation,"LinearDisplayFormatExample"

EndSub

LinearPrecisionExampleSubExample_LinearPrecision()

'ThisexamplereturnstheLinearPrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforLinearPrecisionis:"&dbPref.LinearPrecision,_

vbInformation,"LinearPrecisionExample"

EndSub

LinearUnitExampleSubExample_LinearUnit()

'ThisexamplereturnstheLinearUnitsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Convertthelineardisplayunittoastring.

DimunitAsString

SelectCasedbPref.LinearUnit

CaseaecUnitInch

unit="inch"

CaseaecUnitFoot

unit="foot"

CaseaecUnitYards

unit="yard"

CaseaecUnitMillimeter

unit="millimeters"

CaseaecUnitCentimeter

unit="centimeters"

CaseaecUnitDecimeter

unit="decimeters"

CaseaecUnitMeter

unit="meters"

EndSelect

MsgBox"ThecurrentvalueforLinearUnitis:"&unit,vbInformation,"LinearUnitExample"

EndSub

LineTypeExampleSubExample_LineType()

'Thisexampleshowsthelinetypeofthelayergeneratedbythekey

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

LinetypesExampleSubExample_Linetypes()'Thisexamplefindsthelinetypescollectionand'listsalltheavailablelinetypesinthecollection.DimlinetypeCollAsAcadLineTypesDimentryAsAcadLineTypeDimmsgAsString'ReturnthelinetypecollectionobjectoftheactivedocumentSetlinetypeColl=ThisDrawing.Linetypes'ListallavailablelinetypesForEachentryInlinetypeCollmsg=msg&entry.name&vbCrLfNextMsgBox"Thelinetypesavailableinthisdrawingare:"&vbCrLf&msg,vbInformation,"LinetypesExample"EndSub

LinetypeScaleExampleSubExample_LinetypeScale()'Thisexamplecreatesalineandfindsthelinetypescale'fortheline.Itthenchangesthelinetypescale,andfinally'resetsthelinetypescalebacktotheoriginalvalue.DimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoubleDimlineObjAsAcadLineDimcurrLTScaleAsDouble

'CreateaLineobjectinmodelspacestartPoint(0)=2#:startPoint(1)=2#:startPoint(2)=0#endPoint(0)=4#:endPoint(1)=4#:endPoint(2)=0#SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)lineObj.UpdatecurrLTScale=lineObj.LinetypeScaleMsgBox"Thelinetypescaleforthelineis:"&lineObj.LinetypeScale,vbInformation,"LinetypesExample"

'SetthelinetypescaleofaLineto.5lineObj.LinetypeScale=0.5lineObj.UpdateMsgBox"Thenewlinetypescaleforthelineis:"&lineObj.LinetypeScale,vbInformation,"LinetypesExample"'ResetthelinetypescaleofaLinetowhatiswasbeforelineObj.LinetypeScale=currLTScalelineObj.UpdateMsgBox"Thelinetypescaleforthelineisresetto:"&lineObj.LinetypeScale,vbInformation,"LinetypesExample"EndSub

LineWeightExampleSubExample_LineWeight()

'Thisexampleshowsthelineweightofthelayergeneratedbythekey

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

LineweightDisplayExampleSubExample_LineweightDisplay()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'whethersymbolnamesmayincludeextendedcharactersets,ormore'than31characters.''Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.LineWeightDisplayMsgBox"TheLineweightDisplaypreferenceissetto:"&originalValue

'ModifytheLineweightDisplaypreferencebytogglingthevalueACADPref.LineWeightDisplay=Not(ACADPref.LineWeightDisplay)newValue=ACADPref.LineWeightDisplayMsgBox"TheLineweightDisplaypreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.LineWeightDisplay=originalValueMsgBox"TheLineweightDisplaypreferencewasresetbackto:"&originalValueEndSub

LocationExampleSubExample_Location()

'ThisexampledisplaysthelocationofanAECEntityDimobjAsObjectDimptAsVariantDimgeoAsAecGeoThisDrawing.Utility.GetEntityobj,pt,"SelectanAECEntity"IfTypeOfobjIsAecGeoThenSetgeo=objMsgBox"AECEntityLocation:"&geo.Location(0)&","&geo.Location(1)&","&geo.Location(2),vbInformation,"LocationExample"ElseMsgBox"NotanAECEntity",vbExclamation,"LocationExample"EndIf

EndSub

LowerExtensionExampleSubExample_LowerExtension()

'Thisexampleshowsthedistanceofthelowercutplanebelow'buildingelevationlineposition

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"LowerExtensionis:"&clip.LowerExtension,vbInformation,"LowerExtensionExample"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"LowerExtenstionExample"EndIf

EndSub

MaskBlockStylesExample

SubExample_MaskBlockStyles()

'ThisexamplewilldisplaythenumberofMaskBlockStylesinthecurrentdrawing.

DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationDimcMaskBlocksAsAecMaskBlockStylesapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocumentSetcMaskBlocks=doc.MaskBlockStylesMsgBox"NumberofMaskBlockStylesinthisdrawingis:"_&cMaskBlocks.Count,vbInformation,"MaskBlockStylesExample"

EndSub

MassGroupExampleExamples:

lAecMassElement

lAecMassGroup

SubExample_MassGroup_AecMassElement()

'Thisexampleshowsthenameofthemass'group,ifapplicable

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"MassGroupNameis:"&mass.MassGroup.Name,vbInformation,"MassGroupExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"MassGroupExample"EndIf

EndSub

SubExample_MassGroup_AecMassGroup()

'ThisexampleshowstheMassGrouptheMassElementisattachedto.DimentAsAcadEntityDimptAsVariantDimmassAsAecMassElementDimmassGroupAsAecMassGroup

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMassElement"IfTypeOfentIsAecMassElementThenSetmass=entSetmassGroup=mass.massGroupIfNotmassGroupIsNothingThenMsgBox"MassGroupis:"&massGroup.Name,vbInformation,"MassGroupExample"ElseMsgBox"MassElementisnotpartofaMassGroup",vbInformation,"MassGroupExample"EndIfElseMsgBox"NotanAecMassElement",vbExclamation,"MassGroupExample"EndIf

EndSub

MassGroupsExampleSubExample_MassGroups()

'ThisexamplewilldisplaythenumberofMassGroupsinthecurrentdrawing.

DimappAsNewAecBaseApplicationDimAecdocAsAecBaseDocumentDimmassgroupsAsAecMassGroupsapp.InitThisDrawing.ApplicationSetAecdoc=app.ActiveDocumentSetAecdoc=AecArchBaseApplication.ActiveDocumentSetmassgroups=Aecdoc.massgroupsMsgBox"Thereare"&massgroups.count&"massgroupsinthisdrawing"

EndSub

MaxActiveViewportsExampleSubExample_MaxActiveViewports()'Thisexamplereturnsthecurrentsettingof'MaxActiveViewports.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrMaxActiveViewportsAsIntegerDimnewMaxActiveViewportsAsInteger'RetrievethecurrentMaxActiveViewportsvaluecurrMaxActiveViewports=ThisDrawing.preferences.MaxActiveViewportsMsgBox"ThecurrentvalueforMaxActiveViewportsis"&currMaxActiveViewports,vbInformation,"MaxActiveViewportsExample"'ChangethevalueforMaxActiveViewportsnewMaxActiveViewports=20ThisDrawing.preferences.MaxActiveViewports=newMaxActiveViewportsMsgBox"ThenewvalueforMaxActiveViewportsis"&newMaxActiveViewports,vbInformation,"MaxActiveViewportsExample"'ResetMaxActiveViewportstoitsoriginalvalueThisDrawing.preferences.MaxActiveViewports=currMaxActiveViewportsMsgBox"TheMaxActiveViewportsvalueisresetto"&currMaxActiveViewports,vbInformation,"MaxActiveViewportsExample"EndSub

MeasurementUnitExampleSubExample_MeasurementUnit()

'ThisexamplereturnstheMeasurementUnitsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Convertthemeasurementunittoastring.

DimunitAsString

IfdbPref.MeasurementUnit=acEnglishThen

unit="English"

Else

unit="Metric"

EndIf

MsgBox"ThecurrentvalueforMeasurementUnitis"&unit,_

vbInformation,"MeasurementUnitExample"

EndSub

MirrorExampleSubExample_Mirror()'Thisexamplecreatesalightweightpolyline'andthenmirrorsthatpolyline.'CreatethepolylineDimplineObjAsAcadLWPolylineDimpoints(0To11)AsDoublepoints(0)=1:points(1)=1points(2)=1:points(3)=2points(4)=2:points(5)=2points(6)=3:points(7)=2points(8)=4:points(9)=4points(10)=4:points(11)=1SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=TrueZoomAll'DefinethemirroraxisDimpoint1(0To2)AsDoubleDimpoint2(0To2)AsDoublepoint1(0)=0:point1(1)=4.25:point1(2)=0point2(0)=4:point2(1)=4.25:point2(2)=0MsgBox"Mirrorthepolyline.",,"MirrorExample"'MirrorthepolylineDimmirrorObjAsAcadLWPolylineSetmirrorObj=plineObj.Mirror(point1,point2)mirrorObj.Color=acRedZoomAllMsgBox"Mirrorcompleted.",,"MirrorExample"EndSub

Mirror3DExampleSubExample_Mirror3D()'Thisexamplecreatesaboxinmodelspace.'Itthenmirrorstheboxaboutaplaneandcolors'thenewboxred.DimboxObjAsAcad3DSolidDimlengthAsDouble,widthAsDouble,heightAsDoubleDimcenter(0To2)AsDouble'Definetheboxcenter(0)=5#:center(1)=5#:center(2)=0length=5#:width=7:height=10#'Createthebox(3DSolid)objectinmodelspaceSetboxObj=ThisDrawing.ModelSpace.AddBox(center,length,width,height)'DefinethemirroringplanewiththreepointsDimmirrorPt1(0To2)AsDoubleDimmirrorPt2(0To2)AsDoubleDimmirrorPt3(0To2)AsDoublemirrorPt1(0)=1.25:mirrorPt1(1)=0:mirrorPt1(2)=0mirrorPt2(0)=1.25:mirrorPt2(1)=2:mirrorPt2(2)=0mirrorPt3(0)=1.25:mirrorPt3(1)=2:mirrorPt3(2)=2'MirrortheboxDimmirrorBoxObjAsAcad3DSolidSetmirrorBoxObj=boxObj.Mirror3D(mirrorPt1,mirrorPt2,mirrorPt3)mirrorBoxObj.Color=acRed'ChangetheviewingdirectionoftheviewportDimNewDirection(0To2)AsDoubleNewDirection(0)=-1:NewDirection(1)=-1:NewDirection(2)=1ThisDrawing.ActiveViewport.direction=NewDirectionThisDrawing.ActiveViewport=ThisDrawing.ActiveViewportZoomAll

EndSub

ModelSpaceExampleSubExample_ModelSpace()'Thisexampleaddsalineandacircletomodelspace.'Thelineisaddedusingauser-definedvariablerepresenting'themodelspace.Thecircleisaddedwithoutusingthe'user-definedvariable.EitheruseoftheModelSpace'propertyisvalid.'DefinethelineDimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoublestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=4:endPoint(1)=4:endPoint(2)=0'AddthelinetomodelspaceusingthemspacevariableDimmspaceAsAcadModelSpaceSetmspace=ThisDrawing.ModelSpaceSetlineObj=mspace.AddLine(startPoint,endPoint)'DefineacircleDimcircleObjAsAcadCircleDimcenter(0To2)AsDoubleDimradiusAsDoublecenter(0)=4:center(1)=4:center(2)=0radius=1'AddthecircletomodelspacewithoutusingthemspacevariableSetcircleObj=ThisDrawing.ModelSpace.AddCircle(center,radius)ZoomAllEndSub

ModifiedExample

'Thiscodeisplacedinamoduleandisruntoinitializedtheeventhandler.

PublicehAsNewEventHandler

SubNotify()DimobjAsAcadObjectForEachobjInThisDrawing.ModelSpaceIfTypeOfobjIsAecMassElementThen 'Thissetsaneventhandler(definedbelow)ontheMassElementSeteh.obj=objExitForEndIfNext

EndSub

'ThisistheEventHandlercode'Itisplacedina"ClassModule"

PublicWithEventsobjAsAcadObject

PrivateSubobj_Modified(ByValpObjectAsIAcadObject)DimentAsAecMassElementSetent=pObjectDimlocAsVariantloc=ent.LocationDimstrAsStringstr="AecMassElementat("&loc(0)&","&_loc(1)&","&_loc(2)&")"

MsgBoxstr,,"ObjectEvent"EndSub

MoveExampleSubExample_Move()'Thisexamplecreatesacircleandthenperforms'amoveonthatcircle.'CreatethecircleDimcircleObjAsAcadCircleDimcenter(0To2)AsDoubleDimradiusAsDoublecenter(0)=2#:center(1)=2#:center(2)=0#radius=0.5SetcircleObj=ThisDrawing.ModelSpace.AddCircle(center,radius)ZoomAll'DefinethepointsthatmakeupthemovevectorDimpoint1(0To2)AsDoubleDimpoint2(0To2)AsDoublepoint1(0)=0:point1(1)=0:point1(2)=0point2(0)=2:point2(1)=0:point2(2)=0MsgBox"Movethecircle2unitsintheXdirection.",,"MoveExample"'MovethecirclecircleObj.Movepoint1,point2ZoomAllMsgBox"Movecompleted.",,"MoveExample"EndSub

MVBlockRefExampleExamples:

lAecViewBlock

lAecViewBlocks

SubExample_Name_AecViewBlock()

'ThisexampleshowstheMVBlockRef'snumberofcolors

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objMsgBox"ColorsofViewBlocksMVBlockRef:"&blockRef.viewBlocks.Item(0).MVBlockRef.Color,vbInformation,"MVBlockRefExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"MVBlockRefExample"EndIf

EndSub

SubExample_Name_AecViewBlocks()

'ThisexampleshowsthenumberofcolorsoftheowneroftheViewblockcollection

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRef

DimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"ColorsofMVBlockRefOwner:"&viewBlocks.MVBlockRef.Color,vbInformation,"MVBlockRefExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"MVBlockRefExample"EndIf

EndSub

MVBlockStylesExampleSubExample_MVBlockStyles()'ThisexamplewilldisplaythenumberofMultiViewBlockStylesinthecurrentdrawing.

DimdocAsAecArchBaseDocumentDimcMvBlockStylesAsAecMVBlockStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcMvBlockStyles=doc.MVBlockStylesMsgBox"NumberofMVBlockStylesinthisdrawingis:"&cMvBlockStyles.Count,vbInformation,"MVBlockStylesExample"

EndSub

NameExampleExamples:

lAecMassGroup

lAecCamera

lAecLayerKey

lAecViewBlock

SubExample_Name_AecMassGroup()

'Thisexampleshowsthenameofthemassgroup

DimobjectAsObjectDimgroupAsAecMassGroupDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassGroupThencount=count+1Setgroup=objectMsgBox"MassGroup"&count&"Nameis:"&group.Name,vbInformation,"NameExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementGroupsPresentinDrawing",vbInformation,"NameExample"EndIf

EndSub

SubExample_Name_AecCamera()

'ThisexampledisplaysthenameofaselectedcameraobjectDimobjAsObjectDimptAsVariantDimcameraAsAecCameraThisDrawing.Utility.GetEntityobj,pt,"SelectaCamera"IfTypeOfobjIsAecCameraThenSetcamera=objMsgBox"Nameis:"&camera.Name,vbInformation,"NameExample"ElseMsgBox"NotaCamera",vbExclamation,"NameExample"EndIf

EndSub

SubExample_Name_AecLayerKey()

'Thisexampleshowsthenameofthelayergeneratedbythekey

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'Setsthelayerkeystyletothecurrentlayerstandard

SetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

SubExample_Name_AecViewBlock()

'Thisexampleshowsthenameofthefirstviewblockofamultiviewblock

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefDimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"NameofViewBlock1:"&viewBlocks.Item(0).Name,vbInformation,"NameExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"NameExample"EndIf

EndSub

NodeExampleSubExample_Node()

'Thisexamplewilladdanchoranewmasselementtoa2Dlayoutgridinthe'drawing.DimgridAsAecLayoutGrid2DDimmassAsAecMassElementDimptAsVariantDimobjAsAcadObjectThisDrawing.Utility.GetEntityobj,pt,"Selectgridtoattachto"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")DimanchorAsNewAecAnchorEntToLayoutNodeanchor.Reference=grid'anchorthemasselementtothelastnodeonthegridDimlastNodeAsLonglastNode=grid.XNodes.Count*grid.YNodes.Countanchor.Node=lastNodemass.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"NodeExample"EndIf

EndSub

NodesExampleSubExample_Nodes()

'ThisexampledisplaysthenumberofnodesonthelayoutcurveDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"Numberofnodesis:"&layoutCurve.nodes.Count,vbInformation,"NodesExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"NodesExample"EndIf

EndSub

NormalExampleSubExample_Normal()

'ThisexampledisplaysthenormalvectorofanAECEntityDimobjAsObjectDimptAsVariantDimgeoAsAecGeoThisDrawing.Utility.GetEntityobj,pt,"SelectanAECEntity"IfTypeOfobjIsAecGeoThenSetgeo=objMsgBox"AECEntityNormal:"&geo.Normal(0)&","&geo.Normal(1)&","&geo.Normal(2),vbInformation,"NormalExample"ElseMsgBox"NotanAECEntity",vbExclamation,"NormalExample"EndIf

EndSub

NorthRotationExampleSubExample_NorthRotation()

'ThisexamplereturnstheNorthRotationsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences

MsgBox"ThecurrentvalueforNorthRotationis:"&dbPref.NorthRotation,_

vbInformation,"NorthRotationExample"

EndSub

ObjectIDExampleSubExample_ObjectID()'Thisexamplecreatesseveralobjectsinmodelspace.'Ittheniteratesthroughmodelspaceanddisplaysthe'ObjectIDforeachobjectfound.'CreateaRayobjectinmodelspaceDimrayObjAsAcadRayDimbasePoint(0To2)AsDoubleDimSecondPoint(0To2)AsDoublebasePoint(0)=3#:basePoint(1)=3#:basePoint(2)=0#SecondPoint(0)=1#:SecondPoint(1)=3#:SecondPoint(2)=0#SetrayObj=ThisDrawing.ModelSpace.AddRay(basePoint,SecondPoint)'CreateapolylineobjectinmodelspaceDimplineObjAsAcadLWPolylineDimpoints(0To5)AsDoublepoints(0)=3:points(1)=7points(2)=9:points(3)=2points(4)=3:points(5)=5SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=True

'CreatealineobjectinmodelspaceDimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoublestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=2:endPoint(1)=2:endPoint(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)'CreateacircleobjectinmodelspaceDimcircObjAsAcadCircleDimcenterPt(0To2)AsDoubleDimradiusAsDoublecenterPt(0)=5:centerPt(1)=3:centerPt(2)=0radius=3

SetcircObj=ThisDrawing.ModelSpace.AddCircle(centerPt,radius)

'CreateanellipseobjectinmodelspaceDimellObjAsAcadEllipseDimmajAxis(0To2)AsDoubleDimcenter(0To2)AsDoubleDimradRatioAsDoublecenter(0)=5#:center(1)=5#:center(2)=0#majAxis(0)=10:majAxis(1)=20#:majAxis(2)=0#radRatio=0.3SetellObj=ThisDrawing.ModelSpace.AddEllipse(center,majAxis,radRatio)

ZoomAll'Iteratethroughthemodelspacecollectionanddisplay'theObjectIDofeachentityfound.DimentObjectIDAsLongDimentryAsAcadEntityForEachentryInThisDrawing.ModelSpaceentObjectID=entry.objectIDentry.Highlight(True)MsgBox"TheObjectIDofthisobjectis"&entObjectID,vbInformation,"ObjectIDExample"entry.Highlight(False)NextEndSub

ObjectIDToObjectExampleSubExample_ObjectIDToObject()'Thisexamplecreatesasplineinmodelspace.Itthenreturnsthe'handleforthespline.Thesplineisreturnedfromthehandle,and'thencolored.'CreatethesplineDimsplineObjAsAcadSplineDimstartTan(0To2)AsDoubleDimendTan(0To2)AsDoubleDimfitPoints(0To8)AsDoublestartTan(0)=0.5:startTan(1)=0.5:startTan(2)=0endTan(0)=0.5:endTan(1)=0.5:endTan(2)=0fitPoints(0)=1:fitPoints(1)=1:fitPoints(2)=0fitPoints(3)=5:fitPoints(4)=5:fitPoints(5)=0fitPoints(6)=10:fitPoints(7)=0:fitPoints(8)=0SetsplineObj=ThisDrawing.ModelSpace.AddSpline(fitPoints,startTan,endTan)ZoomAll'FindtheobjectIDofthesplineDimobjectIDAsLongobjectID=splineObj.objectIDMsgBox"TheobjectIDoftheSplineis:"&splineObj.objectID,,"ObjectIDToObjectExample"'FindanobjectfromagivenobjectIDDimtempObjAsAcadObjectSettempObj=ThisDrawing.ObjectIdToObject(objectID)

'NowusethenewlyinitializedobjectvariabletocolortheobjectredtempObj.Color=acRedThisDrawing.RegenTrueMsgBox"TheSplineisnowred.",,"ObjectIDToObjectExample"EndSub

ObjectNameExampleSubExample_ObjectName()'Thisexamplecreatesseveralobjectsinmodelspace.'Ittheniteratesthroughmodelspaceanddisplaysthe'ObjectNameforeachobjectfound.'CreateaRayobjectinmodelspaceDimrayObjAsAcadRayDimbasePoint(0To2)AsDoubleDimSecondPoint(0To2)AsDoublebasePoint(0)=3#:basePoint(1)=3#:basePoint(2)=0#SecondPoint(0)=1#:SecondPoint(1)=3#:SecondPoint(2)=0#SetrayObj=ThisDrawing.ModelSpace.AddRay(basePoint,SecondPoint)'CreateapolylineobjectinmodelspaceDimplineObjAsAcadLWPolylineDimpoints(0To5)AsDoublepoints(0)=3:points(1)=7points(2)=9:points(3)=2points(4)=3:points(5)=5SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=True

'CreatealineobjectinmodelspaceDimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDoublestartPoint(0)=0:startPoint(1)=0:startPoint(2)=0endPoint(0)=2:endPoint(1)=2:endPoint(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)'CreateacircleobjectinmodelspaceDimcircObjAsAcadCircleDimcenterPt(0To2)AsDoubleDimradiusAsDoublecenterPt(0)=20:centerPt(1)=30:centerPt(2)=0radius=3

SetcircObj=ThisDrawing.ModelSpace.AddCircle(centerPt,radius)

'CreateanellipseobjectinmodelspaceDimellObjAsAcadEllipseDimmajAxis(0To2)AsDoubleDimcenter(0To2)AsDoubleDimradRatioAsDoublecenter(0)=5#:center(1)=5#:center(2)=0#majAxis(0)=10:majAxis(1)=20#:majAxis(2)=0#radRatio=0.3SetellObj=ThisDrawing.ModelSpace.AddEllipse(center,majAxis,radRatio)

ZoomAll'Iteratethroughthemodelspacecollectionanddisplay'theobjectnameofeachentityfound.DimobjNameAsStringDimentryAsAcadEntityForEachentryInThisDrawing.ModelSpaceobjName=entry.ObjectNameentry.Highlight(True)MsgBox"Thenameofthisobjectis"&objName,vbInformation,"ObjectNameExample"entry.Highlight(False)NextEndSub

ObjectSortByPlottingExampleSubExample_ObjectSortByPlotting()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyplottingorder.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortByPlottingMsgBox"TheObjectSortByPlottingpreferenceissetto:"&originalValue

'ModifytheObjectSortByPlottingpreferencebytogglingthevalueACADPref.ObjectSortByPlotting=Not(ACADPref.ObjectSortByPlotting)newValue=ACADPref.ObjectSortByPlottingMsgBox"TheObjectSortByPlottingpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortByPlotting=originalValueMsgBox"TheObjectSortByPlottingpreferencewasresetbackto:"&originalValueEndSub

ObjectSortByPSOutputExampleSubExample_ObjectSortByPSOutput()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyPostScriptoutputorder.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortByPSOutputMsgBox"TheObjectSortByPSOutputpreferenceissetto:"&originalValue

'ModifytheObjectSortByPSOutputpreferencebytogglingthevalueACADPref.ObjectSortByPSOutput=Not(ACADPref.ObjectSortByPSOutput)newValue=ACADPref.ObjectSortByPSOutputMsgBox"TheObjectSortByPSOutputpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortByPSOutput=originalValueMsgBox"TheObjectSortByPSOutputpreferencewasresetbackto:"&originalValueEndSub

ObjectSortByRedrawsExampleSubExample_ObjectSortByRedraws()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyredraworder.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortByRedrawsMsgBox"TheObjectSortByRedrawspreferenceissetto:"&originalValue

'ModifytheObjectSortByRedrawspreferencebytogglingthevalueACADPref.ObjectSortByRedraws=Not(ACADPref.ObjectSortByRedraws)newValue=ACADPref.ObjectSortByRedrawsMsgBox"TheObjectSortByRedrawspreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortByRedraws=originalValueMsgBox"TheObjectSortByRedrawspreferencewasresetbackto:"&originalValueEndSub

ObjectSortByRegensExampleSubExample_ObjectSortByRegens()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyregenerationorder.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortByRegensMsgBox"TheObjectSortByRegenspreferenceissetto:"&originalValue

'ModifytheObjectSortByRegenspreferencebytogglingthevalueACADPref.ObjectSortByRegens=Not(ACADPref.ObjectSortByRegens)newValue=ACADPref.ObjectSortByRegensMsgBox"TheObjectSortByRegenspreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortByRegens=originalValueMsgBox"TheObjectSortByRegenspreferencewasresetbackto:"&originalValueEndSub

ObjectSortBySelectionExampleSubExample_ObjectSortBySelection()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyobjectselection.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortBySelectionMsgBox"TheObjectSortBySelectionpreferenceissetto:"&originalValue

'ModifytheObjectSortBySelectionpreferencebytogglingthevalueACADPref.ObjectSortBySelection=Not(ACADPref.ObjectSortBySelection)newValue=ACADPref.ObjectSortBySelectionMsgBox"TheObjectSortBySelectionpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortBySelection=originalValueMsgBox"TheObjectSortBySelectionpreferencewasresetbackto:"&originalValueEndSub

ObjectSortBySnapExampleSubExample_ObjectSortBySnap()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thesortingofdrawingobjectsbyobjectsnap.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.ObjectSortBySnapMsgBox"TheObjectSortBySnappreferenceissetto:"&originalValue

'ModifytheObjectSortBySnappreferencebytogglingthevalueACADPref.ObjectSortBySnap=Not(ACADPref.ObjectSortBySnap)newValue=ACADPref.ObjectSortBySnapMsgBox"TheObjectSortBySnappreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.ObjectSortBySnap=originalValueMsgBox"TheObjectSortBySnappreferencewasresetbackto:"&originalValueEndSub

OffsetExampleSubExample_Offset()

'ThisexamplewillfindtheoffsetoftheMVBlocktagtotheendoftheleader.DimobjAsAcadObjectDimbubbleAsAecMVBlockRefDimanchorAsAecAnchorDimleaderAnchorAsAecAnchorLeadEntToNodeDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectbubble"IfTypeOfobjIsAecMVBlockRefThenSetbubble=objSetanchor=obj.GetAnchorIfTypeOfanchorIsAecAnchorLeadEntToNodeThenSetleaderAnchor=anchorDimoffsetAsVariantDimoffsetStringAsStringoffset=leaderAnchor.offsetoffsetString=offset(0)&","&offset(1)&","&offset(2)MsgBox"Offsetfromnode="&offsetString,vbInformation,"OffsetExample"ElseMsgBox"Notanchoredtocolumngrid",vbInformation,"OffsetExample"EndIfElseMsgBox"Notabubble",vbInformation,"OffsetExample"EndIf

EndSub

OLELaunchExampleSubExample_OLELaunch()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'whethertolaunchtheparentapplicationwhenplottingOLEobjects.'Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.OLELaunchMsgBox"TheOLELaunchpreferenceissetto:"&originalValue

'ModifytheOLELaunchpreferencebytogglingthevalueACADPref.OLELaunch=Not(ACADPref.OLELaunch)newValue=ACADPref.OLELaunchMsgBox"TheOLELaunchpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.OLELaunch=originalValueMsgBox"TheOLELaunchpreferencewasresetbackto:"&originalValueEndSub

OperationExampleExamples:

lAecMassElement

lAecMassGroup

SubExample_Operation_AecMassElement()

'Thisexampleshowstheoperationofamasselement?

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectSelectCasemass.OperationCaseaecMassOperationAddMsgBox"MassElement"&count&"Operation:Add",vbInformation,"OperationExample"CaseaecMassOperationIntersectMsgBox"MassElement"&count&"Operation:Intersect",vbInformation,"OperationExample"CaseaecMassOperationSubtractMsgBox"MassElement"&count&"Operation:Subtract",vbInformation,"OperationExample"EndSelectEndIfNext

Ifcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"OperationExample"EndIf

EndSub

SubExample_Operation_AecMassGroup()

'Thisexampleshowstheoperationofamassgroup?

DimobjectAsObjectDimgroupAsAecMassGroupDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassGroupThencount=count+1Setgroup=objectSelectCasegroup.OperationCaseaecMassOperationAddMsgBox"MassGroup"&count&"Operation:Add",vbInformation,"OperationExample"CaseaecMassOperationIntersectMsgBox"MassGroup"&count&"Operation:Intersect",vbInformation,"OperationExample"CaseaecMassOperationSubtractMsgBox"MassGroup"&count&"Operation:Subtract",vbInformation,"OperationExample"EndSelectEndIfNext

Ifcount=0ThenMsgBox"NoMassElementGroupsPresentinDrawing",vbInformation,"OperationExample"EndIf

EndSub

OverridesEnabledExampleSubExample_OverridesEnabled()

DimdbAsNewAecBaseDatabaseDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsaeclayerkeystyleMsgBox"LayerOverridesEnabled:"&layerKeyStyle.OverridesEnabled,vbInformation,"OverridesEnabledExample"

EndSub

OverrideSettingsExampleSubExample_OverrideSettings()

DimdbAsNewAecBaseDatabaseDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsaeclayerkeystyleDimoverrideSettingsAsAecLayerOverrideSettingsdb.InitThisDrawing.DatabaseSetcLayerKeyStyles=db.LayerKeyStylesSetlayerKeyStyle=cLayerKeyStyles.Item(0)SetoverrideSettings=layerKeyStyle.overrideSettings

EndSub

OwnerIDExampleSubExample_OwnerID()'ThisexamplecreatesanMTextobjectinmodelspace'andthenfindstheOwnerIDfortheobject.DimMTextObjAsAcadMTextDimcorner(0To2)AsDoubleDimwidthAsDoubleDimtextAsStringcorner(0)=0#:corner(1)=10#:corner(2)=0#width=10text="ThisisthetextStringforthemtextObject"

'CreatesthemtextObjectSetMTextObj=ThisDrawing.ModelSpace.AddMText(corner,width,text)ZoomAllMsgBox"TheOwnerIDfortheMTextobjectis:"&MTextObj.OwnerIDEndSub

PaperSpaceExampleSubExample_PaperSpace()'Thisexamplesetsthevariablepspacetothepaperspaceentitycollection.DimpspaceAsAcadPaperSpaceSetpspace=ThisDrawing.PaperSpaceEndSub

PlotConfigurationsExampleSubExample_PlotConfigurations()'ThisexamplewillaccessthePlotConfigurationscollectionforthecurrentdrawing,'addaplotconfiguration,andlistbasicinformationaboutthe'plotconfigurationsinthedrawing.

DimPlotConfigurationsAsAcadPlotConfigurationsDimPlotConfigurationAsAcadPlotConfigurationDimmsgAsString'GetPlotConfigurationscollectionfromdocumentobjectSetPlotConfigurations=ThisDrawing.PlotConfigurations'Iftherearen'tanyplotconfigurations,thenwe'lladdoneIfPlotConfigurations.count=0Then'***Customizethenewconfigurationtoyoursatisfaction***PlotConfigurations.Add"NEW_CONFIGURATION"EndIfmsg=vbCrLf&vbCrLf'Startwithaspace'GetthenamesoftheplotconfigurationsinthisdrawingForEachPlotConfigurationInPlotConfigurationsmsg=msg&PlotConfiguration.name&vbCrLfNext'DisplayalistofavailableplotconfigurationsMsgBox"Thereare"&PlotConfigurations.count&"plotconfiguration(s)in"&_ThisDrawing.WindowTitle&":"&msgEndSub

PlotStyleNameExampleSubExample_PlotStyleName()

'Thisexampleshowstheplotstylenameofthelayergeneratedbythekey

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

PlottableExampleSubExample_Plottable()

'Thisexampleshowswhetherthelayerisplottable

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

PolygonStylesExampleSubExample_PolygonStyles()

'ThisexamplewilldisplaythenumberofPolygonStylesinthecurrentdrawing.

DimdocAsAecArchBaseDocumentDimcPolygonStylesAsAecPolygonStylesSetdoc=AecArchBaseApplication.ActiveDocument

SetcPolygonStyles=doc.PolygonStyles

MsgBox"NumberofPolygonStylesinthisdrawingis:"&cPolygonStyles.Count,vbInformation,"PolygonStylesExample"

EndSub

PreferencesExampleSubExample_Preferences()'ThisexamplereturnstheElevationPrecisionsettingforthecurrentdrawing.DimdbPrefAsAecDatabasePreferencesSetdbPref=AecArchBaseApplication.ActiveDocument.PreferencesMsgBox"ThecurrentvalueforElevationPrecisionis:"&dbPref.ElevationPrecision,_vbInformation,"ElevationPrecisionExample"

EndSub

ProfileExampleExamples:

lAecProfileStyle

lAecRing

lAecRings

SubExample_Profile_AecProfileStyle()

'ThisexamplewilldisplaytheareaofthefirstprofilestyleinthecollectionDimdbAsNewAecBaseDatabaseDimpStyleAsAecProfileStyledb.InitThisDrawing.DatabaseSetpStyle=db.ProfileStyles.Item(0)MsgBox"ProfileArea:"&pStyle.Profile.Area,vbInformation,"ProfileExample"

EndSub

SubExample_Profile_AecRing()

'Thisexamplewilldisplaytheareaofthering'sownerprofileDimdbAsNewAecBaseDatabaseDimringAsAecRingdb.InitThisDrawing.DatabaseSetring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingProfileArea:"&ring.Profile.Area,vbInformation,"ProfileExample"

EndSub

SubExample_Profile_AecRings()

'ThisexamplewilldisplaytheareaoftheprofilethatownstheringcollectionDimdbAsNewAecBaseDatabaseDimpStyleAsAecProfileStyledb.InitThisDrawing.DatabaseSetpStyle=db.ProfileStyles.Item(0)MsgBox"RingsProfileArea:"&pStyle.Profile.rings.Profile.Area,vbInformation,"ProfileExample"

EndSub

ProfileStyleExampleSubExample_ProfileStyle()

DimentAsObjectDimptAsVariantDimmassAsAecMassElement

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMassElement"IfTypeOfentIsAecMassElementThenSetmass=entMsgBox"ProfileStyleis:"&mass.ProfileStyle.Name,vbInformation,"ProfileStyleExample"ElseMsgBox"NotanAecMassElement",vbExclamation,"ProfileStyleExample"EndIf

EndSub

ProfileStyleNameExampleSubExample_ProfileStyleName()

'Thisexampleshowstheprofilestylenameforthemasselement

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Nameis:"&mass.ProfileStyleName,vbInformation,"ProfileStyleNameExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"ProfileStyleNameExample"EndIf

EndSub

ProfileStylesExampleSubExample_ProfileStyles()

'ThisexamplewilldisplaythenumberofProfileStylesinthecurrentdrawing.

DimdocAsAecArchBaseDocumentDimcProfileStylesAsAecProfileStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcProfileStyles=doc.ProfileStylesMsgBox"NumberofProfileStylesinthisdrawingis:"&cProfileStyles.Count,vbInformation,"ProfileStylesExample"

EndSub

ProjectNameExampleSubExample_ProjectName()

'ThisexampledisplaystheProjectNamesettingforthecurrentdrawing

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThesettingforProjectNameis:"&dbPref.ProjectName,_

vbInformation,"ProjectNameExample"

EndSub

RadiusExampleSubExample_Radius()

'ThisexampleshowstheradiusofamasselementDimmassAsAecMassElementDimpt1(0To2)AsDoublept1(0)=100:pt1(1)=100:pt1(2)=0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")mass.Type=aecMassElementTypeConemass.Height=100mass.Radius=50mass.Location=pt1MsgBox"MassElementRadius="&mass.Radius,vbInformation,"RadiusExample"

EndSub

ReferenceExampleSubExample_Reference()'Thisexamplewillmakeamasselementandanchorittoaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortomass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

RegisteredApplicationsExampleSubExample_RegisteredApplications()'ThisexamplefindsthecurrentRegisteredApplicationscollectionand'addsanewRegisteredApplicationtothatcollection.DimRegAppCollAsAcadRegisteredApplicationsSetRegAppColl=ThisDrawing.RegisteredApplications'CreateaRegisteredAppnamed"TEST"inthecurrentdrawingDimRegAppObjAsAcadRegisteredApplicationSetRegAppObj=RegAppColl.Add("TEST")MsgBox"Anewregisteredapplicationcalled"&RegAppObj.name&"hasbeenaddedtotheRegisteredApplicationscollection.",vbInformation,"RegisteredApplicationsExample"EndSub

ReleaseAnchorExampleSubExample_ReleaseAnchor()

'ThisexamplewillreleasetheanchorattachedtoanAECEntity.

DimentAsAcadEntityDimgeoAsAecGeoDimptAsVariantDimanchorAsAecAnchorThisDrawing.Utility.GetEntityent,pt,"Selectedanchoredobject"IfTypeOfentIsAecGeoThenSetgeo=entSetanchor=geo.GetAnchorIfanchorIsNothingThenMsgBox"AECEntitiyisnotanchored",vbInformation,"ReleaseAnchorExample"Elsegeo.ReleaseAnchor'releasestheanchorfromtheentityMsgBox"AECEntityisreleased",vbInformation,"ReleaseAnchorExample"EndIfElseMsgBox"AECEntitynotselected",vbInformation,"ReleaseAnchorExample"EndIf

EndSub

RemoveExampleSubExample_Remove_LayerKeyStyle()

'Thisexampleaddsanewlayerkeystyletothelayerkey'stylescollection,thenremovesthenewstyle.DimappAsNewAecBaseApplicationDimdocAsAecBaseDocumentDimlayerkeystylesAsAecLayerKeyStylesDimlayerkeystyleAsAecLayerKeyStyleDimmsgAsString'Initialize.app.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument'Getthelayerkeystylescollectionandnotethenumber'ofobjectsinthecollection.Setlayerkeystyles=doc.layerkeystylesmsg="Therewere"&layerkeystyles.Count_&"layerkeystylesinthisdrawing."&vbCrLf

'Addanewlayerkeystyletothecollection.Setlayerkeystyle=layerkeystyles.Add("ExampleStyle")layerkeystyle.Description="Thisisatest"msg=msg&"Afteraddingalayerkeystyle,thereare"_&layerkeystyles.Count&"ofthem."MsgBoxmsg,vbInformation,"RemoveExample"

'Notethenumberofobjectsinthelayerkeystylescollectionnow.msg="Thenewlayerkeystylehad"&layerkeystyle.Keys.Count&"keys--"&vbCrLf

'Removethelayerkeystylethatwasjustadded.layerkeystyles.Remove("ExampleStyle")

msg=msg&"butI'vesinceremovedthestyle..."MsgBoxmsg,vbInformation,"RemoveExample"

EndSub

RemoveableExampleSubExample_Removeable()

'Thisexampleshowswhetherthelayerisremoveable

DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)SetcLayerKeys=layerKeyStyle.KeysForEachlayerKeyIncLayerKeysDebug.PrintlayerKey.NameDebug.Print"Color-"&layerKey.ColorDebug.Print"Layer-"&layerKey.LayerDebug.Print"LineType-"&layerKey.LinetypeDebug.Print"Lineweight-"&layerKey.LineweightDebug.Print"Plotstyle-"&layerKey.PlotStyleNameDebug.Print"Plottable-"&layerKey.PlottableDebug.Print"Removable-"&layerKey.RemoveableNext

EndSub

RenderSmoothnessExampleSubExample_RenderSmoothness()'Thisexamplereturnsthecurrentsettingof'RenderSmoothness.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrRenderSmoothnessAsDoubleDimnewRenderSmoothnessAsDouble'RetrievethecurrentRenderSmoothnessvaluecurrRenderSmoothness=ThisDrawing.preferences.RenderSmoothnessMsgBox"ThecurrentvalueforRenderSmoothnessis"&currRenderSmoothness,vbInformation,"RenderSmoothnessExample"'ChangethevalueforRenderSmoothnessnewRenderSmoothness=2.5ThisDrawing.preferences.RenderSmoothness=newRenderSmoothnessMsgBox"ThenewvalueforRenderSmoothnessis"&newRenderSmoothness,vbInformation,"RenderSmoothnessExample"'ResetRenderSmoothnesstoitsoriginalvalueThisDrawing.preferences.RenderSmoothness=currRenderSmoothnessMsgBox"TheRenderSmoothnessvalueisresetto"&currRenderSmoothness,vbInformation,"RenderSmoothnessExample"EndSub

ResizeOffsetExampleSubExample_ResizeOffset()

'Thisexamplewilltakeamasselementanchoredtoa2DLayoutGrid,and'applyaResizeOffsettoit.

DimobjAsAcadObjectDimanchorAsAecAnchorEntToLayoutCellDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectanchoredelement"IfTypeOfobjIsAecMassElementThenDimmassAsAecMassElementSetmass=objIfTypeOfmass.GetAnchorIsAecAnchorEntToLayoutCellThenSetanchor=mass.GetAnchoranchor.ResizeOffset=-22anchor.ApplyResize=FalseEndIfEndIf

EndSub

RightOffsetExampleSubExample_RightOffset()

'Thisexamplereturnstherightoffsetoftheselectedobject'tothegridassembly.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimoffsetAsStringOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"RightOffsetExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0IfanchorIsNothingThenMsgBox"Selectedobjectisnotanchored.",vbExclamation,"RightOffsetExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"RightOffsetExample"ElseMsgBox"Rightoffsetofobject:"&anchor.RightOffset,vbInformation,"RightOffsetExample"

EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"RightOffsetExample"EndIf

EndSub

RingsExampleSubExample_Rings()

'ThisexampleshowsthenumberofringsoftheprofileofanAecPolygon

DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileRings:"&poly.Profile.rings.Count,vbInformation,"RingsExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"RingsExample"EndIf

EndSub

RiseExampleSubExample_Rise()

'Thisexampleshowstheriseofthemasselementifgableshape

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Riseis:"&mass.Rise,vbInformation,"RiseExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"RiseExample"EndIf

EndSub

RotateExampleSubExample_Rotate()'Thisexamplecreatesalightweightpolyline'andthenrotatesthatpolyline.'CreatethepolylineDimplineObjAsAcadLWPolylineDimpoints(0To11)AsDoublepoints(0)=1:points(1)=2points(2)=1:points(3)=3points(4)=2:points(5)=3points(6)=3:points(7)=3points(8)=4:points(9)=4points(10)=4:points(11)=2SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=TrueZoomAllMsgBox"Rotatethepolylineby45degrees.",,"RotateExample"'DefinetherotationDimbasePoint(0To2)AsDoubleDimrotationAngleAsDoublebasePoint(0)=4:basePoint(1)=4.25:basePoint(2)=0rotationAngle=0.7853981'45degrees'RotatethepolylineplineObj.RotatebasePoint,rotationAngleZoomAllMsgBox"Rotationcompleted.",,"RotateExample"EndSub

Rotate3DExampleSubExample_Rotate3D()'Thisexamplecreatesaboxinmodelspace.'Itthenrotatestheboxaboutanaxis.DimboxObjAsAcad3DSolidDimlengthAsDouble,widthAsDouble,heightAsDoubleDimcenter(0To2)AsDouble'Definetheboxcenter(0)=5#:center(1)=5#:center(2)=0length=5#:width=7:height=10#'Createthebox(3DSolid)objectinmodelspaceSetboxObj=ThisDrawing.ModelSpace.AddBox(center,length,width,height)'ChangetheviewingdirectionoftheviewportDimNewDirection(0To2)AsDoubleNewDirection(0)=-1:NewDirection(1)=-1:NewDirection(2)=1ThisDrawing.ActiveViewport.direction=NewDirectionThisDrawing.ActiveViewport=ThisDrawing.ActiveViewportThisDrawing.RegenTrue'DefinetherotationaxiswithtwopointsDimrotatePt1(0To2)AsDoubleDimrotatePt2(0To2)AsDoubleDimrotateAngleAsDoublerotatePt1(0)=-3:rotatePt1(1)=4:rotatePt1(2)=0rotatePt2(0)=-3:rotatePt2(1)=-4:rotatePt2(2)=0rotateAngle=30rotateAngle=rotateAngle*3.141592/180#'Drawalinebetweenthetwoaxispointssothatitisvisible.'Thisisoptional.Itisnotrequiredfortherotation.DimaxisLineAsAcadLineSetaxisLine=ThisDrawing.ModelSpace.AddLine(rotatePt1,rotatePt2)

axisLine.UpdateMsgBox"Rotatethebox30degreesabouttheaxisshown.",,"Rotate3DExample"

'RotatetheboxboxObj.Rotate3DrotatePt1,rotatePt2,rotateAngleThisDrawing.RegenTrueMsgBox"Theboxisrotated30degrees.",,"Rotate3DExample"EndSub

RotationExampleSubExample_Rotation()

'ThisexampleshowstherotationreferanceangleforanAECEntity

DimobjectAsObjectDimptAsVariantDimgeoAsAecGeo

ThisDrawing.Utility.GetEntityobject,pt,"SelectAECEntity:"IfTypeOfobjectIsAecGeoThenSetgeo=objectDimrotStringAsStringrotString=ThisDrawing.Utility.AngleToString(geo.Rotation,acDegrees,4)MsgBox"AECEntityRotationis:"&rotString,vbInformation,"RotationExample"ElseMsgBox"NoAECEntityselected.",vbInformation,"RotationExample"EndIf

EndSub

SaveAsDefaultExampleSubExample_SaveAsDefault()

'ThisexamplesetstheTextHeightsettingto0.25

'andsavesitasthedefault.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

dbPref.TextHeight=0.25

dbPref.SaveAsDefault

MsgBox"ThenewdefaultvalueforTextHeightis:"&dbPref.TextHeight,_

vbInformation,"SaveAsDefaultExample"

EndSub

ScaleEntityExampleSubExample_ScaleEntity()'Thisexamplecreatesalightweightpolyline'andthenscalesthatpolyline.'CreatethepolylineDimplineObjAsAcadLWPolylineDimpoints(0To11)AsDoublepoints(0)=1:points(1)=2points(2)=1:points(3)=3points(4)=2:points(5)=3points(6)=3:points(7)=3points(8)=4:points(9)=4points(10)=4:points(11)=2SetplineObj=ThisDrawing.ModelSpace.AddLightWeightPolyline(points)plineObj.Closed=TrueZoomAllMsgBox"Scalethepolylineby0.5",,"ScaleEntityExample"'DefinethescaleDimbasePoint(0To2)AsDoubleDimscalefactorAsDoublebasePoint(0)=4:basePoint(1)=4.25:basePoint(2)=0scalefactor=0.5'ScalethepolylineplineObj.ScaleEntitybasePoint,scalefactorZoomAllMsgBox"Scalecompleted.",,"ScaleEntityExample"EndSub

ScaleOnInsertExampleSubExample_ScaleOnInsert()

'ThisexamplereturnstheScaleOnInsertsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Convertthescaleoninsertvaluetoastring.

DimscaleinsAsString

IfdbPref.ScaleOnInsert=TrueThen

scaleins="scaleoninsert."

Else

scaleins="donotscaleoninsert."

EndIf

MsgBox"ThecurrentvalueforScaleOnInsertis"&scaleins,_

vbInformation,"ScaleOnInsertExample"

EndSub

ScaleXExampleExamples:

lAecMaskBlockRef

lAecMVBlockRef

SubExample_ScaleX_AecMaskBlockRef()

'ThisexampleshowstheXscaleofthemaskblockDimobjAsObjectDimptAsVariantDimmaskAsAecMaskBlockRef

ThisDrawing.Utility.GetEntityobj,pt,"SelectMaskBlock"IfTypeOfobjIsAecMaskBlockRefThenSetmask=objMsgBox"ScaleXis:"&mask.ScaleX,vbInformation,"ScaleXExample"ElseMsgBox"NotaMaskBlock",vbExclamation,"ScaleXExample"EndIf

EndSub

SubExample_ScaleX_AecMVBlockRef()

DimentAsAcadEntityDimptAsVariantDimmvBlockAsAecMVBlockRef

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMulti-ViewBlock"

IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleXis:"&mvBlock.ScaleX,vbInformation,"ScaleXExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleXExample"EndIf

EndSub

ScaleXYExampleSubExample_ScaleXY()

DimringAsAecRingDimprofileAsAecProfile

DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleSetcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item(0)

SetprofileStyle.profile=profile.ScaleXY(2,1)

EndSub

ScaleYExampleExamples:

lAecMaskBlockRef

lAecMVBlockRef

SubExample_ScaleY_AecMaskBlockRef()

'ThisexampleshowstheYscaleofthemaskblockDimobjAsObjectDimptAsVariantDimmaskAsAecMaskBlockRef

ThisDrawing.Utility.GetEntityobj,pt,"SelectMaskBlock"IfTypeOfobjIsAecMaskBlockRefThenSetmask=objMsgBox"ScaleYis:"&mask.ScaleY,vbInformation,"ScaleYExample"ElseMsgBox"NotaMaskBlock",vbExclamation,"ScaleYExample"EndIf

EndSub

SubExample_ScaleY_AecMVBlockRef()

DimentAsAcadEntityDimptAsVariantDimmvBlockAsAecMVBlockRef

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMulti-ViewBlock"

IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleYis:"&mvBlock.ScaleY,vbInformation,"ScaleYExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleYExample"EndIf

EndSub

ScaleZExampleExamples:

lAecMaskBlockRef

lAecMVBlockRef

SubExample_ScaleZ_AecMaskBlockRef()

'ThisexampleshowstheZscaleofthemaskblockDimobjAsObjectDimptAsVariantDimmaskAsAecMaskBlockRef

ThisDrawing.Utility.GetEntityobj,pt,"SelectMaskBlock"IfTypeOfobjIsAecMaskBlockRefThenSetmask=objMsgBox"ScaleZis:"&mask.ScaleZ,vbInformation,"ScaleZExample"ElseMsgBox"NotaMaskBlock",vbExclamation,"ScaleZExample"EndIf

EndSub

SubExample_ScaleZ_AecMVBlockRef()

DimentAsAcadEntityDimptAsVariantDimmvBlockAsAecMVBlockRef

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMulti-ViewBlock"

IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleZis:"&mvBlock.ScaleZ,vbInformation,"ScaleZExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleZExample"EndIf

EndSub

SegmentPerPolylineExampleSubExample_SegmentPerPolyline()'Thisexamplereturnsthecurrentsettingof'SegmentPerPolyline.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrSegmentPerPolylineAsIntegerDimnewSegmentPerPolylineAsInteger'RetrievethecurrentSegmentPerPolylinevaluecurrSegmentPerPolyline=ThisDrawing.preferences.SegmentPerPolylineMsgBox"ThecurrentvalueforSegmentPerPolylineis"&currSegmentPerPolyline,vbInformation,"SegmentPerPolylineExample"'ChangethevalueforSegmentPerPolylinenewSegmentPerPolyline=2001ThisDrawing.preferences.SegmentPerPolyline=newSegmentPerPolylineMsgBox"ThenewvalueforSegmentPerPolylineis"&newSegmentPerPolyline,vbInformation,"SegmentPerPolylineExample"'ResetSegmentPerPolylinetoitsoriginalvalueThisDrawing.preferences.SegmentPerPolyline=currSegmentPerPolylineMsgBox"TheSegmentPerPolylinevalueisresetto"&currSegmentPerPolyline,vbInformation,"SegmentPerPolylineExample"EndSub

SelfIntersectsExampleSubExample_SelfIntersects()

'ThisexampleshowsifanAecPolygonselfintersects

DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileSelfIntersects?:"&poly.Profile.SelfIntersects,vbInformation,"SelfIntersectsExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"SelfIntersectsExample"EndIf

EndSub

SetXDataExampleSubExample_SetXdata()'Thisexamplecreatesalineandattachesextendeddatatothatline.'CreatethelineDimlineObjAsAcadLineDimstartPt(0To2)AsDouble,endPt(0To2)AsDoublestartPt(0)=1#:startPt(1)=1#:startPt(2)=0#endPt(0)=5#:endPt(1)=5#:endPt(2)=0#SetlineObj=ThisDrawing.ModelSpace.AddLine(startPt,endPt)ZoomAll

'Initializeallthexdatavalues.Notethatfirstdatainthelistshouldbe'applicationnameandfirstdatatypecodeshouldbe1001DimDataType(0To9)AsIntegerDimData(0To9)AsVariantDimreals3(0To2)AsDoubleDimworldPos(0To2)AsDoubleDataType(0)=1001:Data(0)="Test_Application"DataType(1)=1000:Data(1)="Thisisatestforxdata"

DataType(2)=1003:Data(2)="0"'layerDataType(3)=1040:Data(3)=1.23479137438413E+40'realDataType(4)=1041:Data(4)=1237324938'distanceDataType(5)=1070:Data(5)=32767'16bitIntegerDataType(6)=1071:Data(6)=32767'32bitIntegerDataType(7)=1042:Data(7)=10'scaleFactor

reals3(0)=-2.95:reals3(1)=100:reals3(2)=-20DataType(8)=1010:Data(8)=reals3'realworldPos(0)=4:worldPos(1)=400.99999999:worldPos(2)=2.798989DataType(9)=1011:Data(9)=worldPos'worldspaceposition'AttachthexdatatothelinelineObj.SetXDataDataType,Data

'ReturnthexdataforthelineDimxdataOutAsVariantDimxtypeOutAsVariantlineObj.GetXData"",xtypeOut,xdataOutEndSub

Side1ExampleSubExample_Side1()

'Thisexampleshowsthelengthofcutplanealongthestartingedge

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Side1is:"&clip.Side1,vbInformation,"Side1Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Side1Example"EndIf

EndSub

Side2ExampleSubExample_Side2()

'Thisexampleshowsthelengthofcutplanealongtheendingedge

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Side2is:"&clip.Side2,vbInformation,"Side2Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Side2Example"EndIf

EndSub

SolidFillExampleSubExample_SolidFill()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'whethermultilines,traces,solids,allhatches(includingsolid-fill)'andwidepolylinesarefilledin.''Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.SolidFillMsgBox"TheSolidFillpreferenceissetto:"&originalValue

'ModifytheSolidFillpreferencebytogglingthevalueACADPref.SolidFill=Not(ACADPref.SolidFill)newValue=ACADPref.SolidFillMsgBox"TheSolidFillpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.SolidFill=originalValueMsgBox"TheSolidFillpreferencewasresetbackto:"&originalValueEndSub

StartOffsetExampleSubExample_StartOffset()

'ThisexampledisplaysthestartoffsetofaselectedAECLayoutCurveobjectDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"StartOffsetis:"&layoutCurve.StartOffset,vbInformation,"StartOffsetExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"StartOffsetExample"EndIf

EndSub

StyleExampleSubExample_Style()

'ThisexampleshowsthestyleofanAECEntity

DimobjAsObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectanAECObject"

IfTypeOfobjIsAecGeoThenOnErrorResumeNextDimnameAsStringname=obj.Style.name'Iftheentitydoesn'tuseastyle,thiswillfailIf(name"")ThenMsgBox"Styleis:"&name,vbInformation,"StyleExample"ElseMsgBox"AECEntitydoesnothaveastyle",vbInformation,"StyleExample"EndIfElseMsgBox"NotaAECEntity",vbExclamation,"StyleExample"EndIf

EndSub

StyleNameExampleSubExample_StyleName()

'ThisexampleshowsthestylenameofanAECEntity

DimobjAsObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectanAECObject"IfTypeOfobjIsAecGeoThenOnErrorResumeNextDimnameAsStringname=obj.StyleName'Iftheentitydoesn'tuseastyle,thiswillfailIf(name"")ThenMsgBox"Styleis:"&name,vbInformation,"StyleExample"ElseMsgBox"AECEntitydoesnothaveastyle",vbInformation,"StyleExample"EndIfElseMsgBox"NotaAECEntity",vbExclamation,"StyleExample"EndIf

EndSub

SubtractExampleSubExample_Subtract()

'Thisexampleaddstwoprofilesfromrings,andsubtractsthesecondfromthefirst

OnErrorResumeNextDimpointList1(0To9)AsDoubleDimpointList2(0To7)AsDoublepointList1(0)=0:pointList1(1)=0pointList1(2)=1:pointList1(3)=0pointList1(4)=1:pointList1(5)=1pointList1(6)=0:pointList1(7)=1pointList1(8)=0:pointList1(9)=0

pointList2(0)=0.5:pointList2(1)=0.5pointList2(2)=0.067:pointList2(3)=-0.25pointList2(4)=0.933:pointList2(5)=-0.25pointList2(6)=0.5:pointList2(7)=0.5

Dimring1AsAecRingDimring2AsAecRingDimprofile1AsNewAecProfileDimprofile2AsNewAecProfile

DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleSetcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("SubtractRing")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("SubtractRing")EndIfSetring1=profile1.Rings.AddSetring2=profile2.Rings.Add

ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)

profile1.Subtractprofile2

SetprofileStyle.profile=profile1

EndSub

TextFrameDisplayExampleSubExample_TextFrameDisplay()'Thisexamplereturnsthecurrentsettingof'TextFrameDisplay.Itthenchangesthevalue,andfinally'itresetsthevaluebacktotheoriginalsetting.DimcurrTextFrameDisplayAsBoolean'RetrievethecurrentTextFrameDisplayvaluecurrTextFrameDisplay=ThisDrawing.preferences.TextFrameDisplayMsgBox"ThecurrentvalueforTextFrameDisplayis"&preferences.TextFrameDisplay,vbInformation,"TextFrameDisplayExample"'ChangethevalueforTextFrameDisplayThisDrawing.preferences.TextFrameDisplay=Not(currTextFrameDisplay)MsgBox"ThenewvalueforTextFrameDisplayis"&preferences.TextFrameDisplay,vbInformation,"TextFrameDisplayExample"'ResetTextFrameDisplaytoitsoriginalvalueThisDrawing.preferences.TextFrameDisplay=currTextFrameDisplayMsgBox"TheTextFrameDisplayvalueisresetto"&preferences.TextFrameDisplay,vbInformation,"TextFrameDisplayExample"EndSub

TextHeightExampleSubExample_TextHeight()

'ThisexampledisplaystheTextHeightsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThecurrentvalueforTextHeightis:"&dbPref.TextHeight,_

vbInformation,"TextHeightExample"

EndSub

TextStylesExampleSubExample_TextStyles()'ThisexamplefindsthecurrentTextstylescollectionand'addsanewTextstyletothatcollection.DimTextCollAsAcadTextStylesSetTextColl=ThisDrawing.TextStyles'CreateaTextstylenamed"TEST"inthecurrentdrawingDimtextStyleAsAcadTextStyleSettextStyle=TextColl.Add("TEST")MsgBox"AnewTextstylecalled"&textStyle.name&"hasbeenaddedtotheTextstylescollection.",vbInformation,"TextstylesExample"EndSub

TopOffsetExampleSubExample_TopOffset()

'Thisexamplemodifiesthetopoffsetoftheselectedobject'inrelationtoitsanchorpointonthegridassembly.It'promptstheusertoselecttheobjecttobemodified,'andthenitpromptstheusertospecifythenumberofinches'toadjusttheoffsetby.Thenumbercanbeeitherpositive'ornegative.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimoffsetAsStringDimoffset_adjustAsDoubleOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"TopOffsetExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0IfanchorIsNothingThen

MsgBox"Selectedobjectisnotanchored.",vbExclamation,"TopOffsetExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"TopOffsetExample"Else'AdjustSizingmustbesettoTrueinorderforoffsetchangetotakeeffect.anchor.AdjustSizing=TrueMsgBox"Topoffsetofobjectwas:"&anchor.TopOffset,vbInformation,"TopOffsetExample"'Promptusertospecifyamounttoadjustoffsetby.offset_adjust=ThisDrawing.Utility.GetReal("Enterthenumberofinchestoadjusttopoffsetby:")'Changeoffsetbyspecifiedamount.anchor.TopOffset=anchor.TopOffset+offset_adjustThisDrawing.Regen(acActiveViewport)MsgBox"Newtopoffsetis:"&anchor.TopOffset,vbInformation,"TopOffsetExample"EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"TopOffsetExample"EndIf

EndSub

TransformByExampleSubExample_TransformBy()'Thisexamplecreatesalineandrotatesit90degrees'usingatransformationmatrix.'CreatealineDimlineObjAsAcadLineDimstartPt(0To2)AsDoubleDimendPt(0To2)AsDoublestartPt(0)=2:startPt(1)=1:startPt(2)=0endPt(0)=5:endPt(1)=1:endPt(2)=0SetlineObj=ThisDrawing.ModelSpace.AddLine(startPt,endPt)lineObj.Update'InitializethetransMatvariablewithatransformationmatrix'thatwillrotateanobjectby90degreesaboutthepoint(0,0,0)'(Moreexamplesoftransformationmatricesarelistedbelow)DimtransMat(0To3,0To3)AsDoubletransMat(0,0)=0#:transMat(0,1)=-1#:transMat(0,2)=0#:transMat(0,3)=0#transMat(1,0)=1#:transMat(1,1)=0#:transMat(1,2)=0#:transMat(1,3)=0#transMat(2,0)=0#:transMat(2,1)=0#:transMat(2,2)=1#:transMat(2,3)=0#transMat(3,0)=0#:transMat(3,1)=0#:transMat(3,2)=0#:transMat(3,3)=1#'TransformthelineusingthedefinedtransformationmatrixMsgBox"Transformtheline.",,"TransformByExample"lineObj.TransformBy(transMat)ZoomAllMsgBox"Thelineistransformed.",,"TransformByExample"

'Moreexamplesoftransformationmatrices:

'RotationMatrix:90Degreesaboutpoint0,0,0'0.000000-1.0000000.0000000.000000'1.0000000.0000000.0000000.000000'0.0000000.0000001.0000000.000000

'0.0000000.0000000.0000001.000000

'RotationMatrix:45Degreesaboutpoint5,5,0'0.707107-0.7071070.0000005.000000'0.7071070.7071070.000000-2.071068'0.0000000.0000001.0000000.000000'0.0000000.0000000.0000001.000000

'TranslationMatrix:moveanobjectby10,10,0'1.0000000.0000000.00000010.000000'0.0000001.0000000.00000010.000000'0.0000000.0000001.0000000.000000'0.0000000.0000000.0000001.000000

'ScalingMatrix:scaleby10,10atpoint0,0,0'10.0000000.0000000.0000000.000000'0.00000010.0000000.0000000.000000'0.0000000.00000010.0000000.000000'0.0000000.0000000.0000001.000000

'ScalingMatrix:scaleby10atpoint2,2'10.0000000.0000000.000000-18.000000'0.00000010.0000000.000000-18.000000'0.0000000.00000010.0000000.000000'0.0000000.0000000.0000001.000000EndSub

TypeExampleExamples:

lAecLayoutCurve

lAecMassElement

SubExample_Type_AecLayoutCurve()

'ThisexampledisplaysthespacingruleusedonaselectedaeclayoutcurveobjectDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveDimlayoutTypeAsAecLayoutTypeDimstrAsStringThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objlayoutType=layoutCurve.TypeSelectCaselayoutTypeCaseaecLayoutTypeAutoSpacingBaystr="BaySpacing"CaseaecLayoutTypeAutoSpacingEvenstr="EvenSpacing"CaseaecLayoutTypeManualSpacingstr="ManualSpacing"EndSelectMsgBox"Layoutruleis:"&str,vbInformation,"TypeExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"TypeExample"EndIf

EndSub

SubExample_Type_AecMassElement()

'Thisexampleshowsthetypeofmasselement

DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectSelectCasemass.TypeCaseaecMassElementTypeArchMsgBox"MassElement"&count&"Type:Arch",vbInformation,"TypeExample"CaseaecMassElementTypeBarrelVaultMsgBox"MassElement"&count&"Type:BarrelVault",vbInformation,"TypeExample"CaseaecMassElementTypeBoxMsgBox"MassElement"&count&"Type:Box",vbInformation,"TypeExample"CaseaecMassElementTypeConeMsgBox"MassElement"&count&"Type:Cone",vbInformation,"TypeExample"CaseaecMassElementTypeCylinderMsgBox"MassElement"&count&"Type:Cylinder",vbInformation,"TypeExample"CaseaecMassElementTypeDomeMsgBox"MassElement"&count&"Type:Dome",vbInformation,"TypeExample"CaseaecMassElementTypeDoricMsgBox"MassElement"&count&"Type:Doric",vbInformation,"TypeExample"CaseaecMassElementTypeExtrusionMsgBox"MassElement"&count&"Type:Extrusion",vbInformation,"TypeExample"CaseaecMassElementTypeGableMsgBox"MassElement"&count&"Type:Gable",vbInformation,"TypeExample"

CaseaecMassElementTypeIsoscelesTriangleMsgBox"MassElement"&count&"Type:IsoscelesTriangle",vbInformation,"TypeExample"CaseaecMassElementTypePyramidMsgBox"MassElement"&count&"Type:Pyramid",vbInformation,"TypeExample"CaseaecMassElementTypeRevolutionMsgBox"MassElement"&count&"Type:Revolution",vbInformation,"TypeExample"CaseaecMassElementTypeRightTriangleMsgBox"MassElement"&count&"Type:RightTriangle",vbInformation,"TypeExample"CaseaecMassElementTypeSphereMsgBox"MassElement"&count&"Type:Sphere",vbInformation,"TypeExample"EndSelectEndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"TypeExample"EndIf

EndSub

UserCoordinateSystemsExampleSubExample_UserCoordinateSystems()'ThisexamplefindsthecurrentUserCoordinateSystemscollectionand'addsanewUCStothatcollection.DimUCSCollAsAcadUCSsSetUCSColl=ThisDrawing.UserCoordinateSystems'CreateaUCSnamed"TEST"inthecurrentdrawingDimucsObjAsAcadUCSDimorigin(0To2)AsDoubleDimxAxisPnt(0To2)AsDoubleDimyAxisPnt(0To2)AsDouble'DefinetheUCSorigin(0)=4#:origin(1)=5#:origin(2)=3#xAxisPnt(0)=5#:xAxisPnt(1)=5#:xAxisPnt(2)=3#yAxisPnt(0)=4#:yAxisPnt(1)=6#:yAxisPnt(2)=3#'AddtheUCStotheUserCoordinatesSystemscollectionSetucsObj=UCSColl.Add(origin,xAxisPnt,yAxisPnt,"TEST")MsgBox"AnewUCScalled"&ucsObj.name&"hasbeenaddedtotheUserCoordinateSystemscollection.",vbInformation,"UserCoordinateSystemsExample"EndSub

UpdateExampleSubExample_Update()'Thisexamplecreatesalineinmodelspace.Itdisplaysa'Msgboximmediatelybeforethecalltoupdatethelineand'againafterthecall.DimlineObjAsAcadLineDimstartPoint(0To2)AsDoubleDimendPoint(0To2)AsDouble

'CreateaLineobjectinmodelspacestartPoint(0)=2#:startPoint(1)=2#:startPoint(2)=0#endPoint(0)=4#:endPoint(1)=4#:endPoint(2)=0#SetlineObj=ThisDrawing.ModelSpace.AddLine(startPoint,endPoint)lineObj.Color=acRedMsgBox"Beforetheupdate.",,"UpdateExample"'ThefollowingcodedrawsanobjectinAutoCADwindowlineObj.UpdateMsgBox"Aftertheupdate.",,"UpdateExample"'ThefollowingcallupdatestheentiredrawingThisDrawing.Application.UpdateEndSub

UseModelExtentsExampleSubExample_UseModelExtents()

'Thisexampledeterminesiftheheightandlower'extensionaresetautomaticallyusingmodelextents

DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"UseModelExtents?:"&clip.UseModelExtents,vbInformation,"UseModelExtentsExample"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"UseModelExtentsExample"EndIf

EndSub

UseNodeCSExampleSubExample_UseNodeCS()

'ThisexampleattachesaMassElementtoa2DLayoutGrid,andusestheNodes

'coordinatesystem.

DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenDimgridAsAecLayoutGrid2DSetgrid=objDimmassAsAecMassElementSetmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")DimanchorAsNewAecAnchorEntToLayoutNodeanchor.Reference=gridanchor.Node=1anchor.UseNodeCS=Truemass.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"UseNodeCSExample"EndIf

EndSub

ValidExampleExamples:

lAecProfile

lAecRing

SubExample_Valid_AecProfile()

'ThisexampleshowsifanAecPolygonisvalid

DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileValid:"&poly.Profile.Valid,vbInformation,"ValidExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"ValidExample"EndIf

EndSub

SubExample_Valid_AecRing()

'ThisexamplewilldisplaythevalidityoftheringDimdbAsNewAecBaseDatabaseDimringAsAecRingdb.InitThisDrawing.Database

Setring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingValid?:"&ring.Valid,vbInformation,"ValidExample"

EndSub

ValueExampleExamples:

lAecLayerOverrideSetting

lAecLayoutCurve

SubExample_Value_AecLayerOverrideSetting()

'Thisexampleshowsthenameoftheowneroftheoverridesetting

DimdbAsNewAecBaseDatabaseDimsettingAsAecLayerOverrideSettingdb.InitThisDrawing.DatabaseSetsetting=db.LayerKeyStyles.Item(0).overrideSettings.Item(0)MsgBox"SettingValue:"&setting.Value,vbInformation,"ValueExample"

EndSub

SubExample_Value_AecLayoutCurve()

'ThisexamplesshoweitherthebayspacingorthenumberofnodesonthelayoutcurveDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveDimstrAsStringThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=obj

SelectCaselayoutCurve.TypeCaseaecLayoutTypeAutoSpacingBaystr="Bayspacing="&layoutCurve.ValueCaseaecLayoutTypeAutoSpacingEvenstr="Numberofevenspaces="&layoutCurve.ValueCaseaecLayoutTypeManualSpacingstr="ManualSpacing"EndSelect

MsgBoxstr,vbInformation,"ValueExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"ValueExample"EndIf

EndSub

VerticalScaleExampleSubExample_VerticalScale()

'Thisexamplewilldisplaytheverticalscaleofthedatabase.

DimdbAsNewAecArchBaseDatabaseDimprefAsAecArchBaseDatabasePreferencesdb.InitThisDrawing.DatabaseSetpref=db.PreferencesMsgBox"VerticalScaleofthedatabase:"&pref.VerticalScale,vbInformation,_

"VerticalScaleExample"

EndSub

ViewBlocksExampleSubExample_ViewBlocks()

DimentAsAcadEntityDimptAsVariantDimmvBlockAsAecMVBlockRefDimcViewBlocksAsAecViewBlocks

ThisDrawing.Utility.GetEntityent,pt,"SelectAECMulti-ViewBlock"IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entSetcViewBlocks=mvBlock.viewBlocksMsgBox"NumberofViewblocksis:"&cViewBlocks.Count,vbInformation,"StyleNameExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"StyleNameExample"EndIf

EndSub

ViewportsExampleSubViewports()'ThisexamplefindsthecurrentViewportscollectionand'addsanewviewporttothatcollection.DimviewportCollAsAcadViewportsSetviewportColl=ThisDrawing.Viewports'Createaviewportnamed"TEST"inthecurrentdrawingDimviewportObjAsAcadViewportSetviewportObj=viewportColl.Add("TEST")MsgBox"Anewviewportcalled"&viewportObj.name&"hasbeenaddedtotheViewportscollection.",vbInformation,"ViewportsExample"EndSub

ViewsExampleSubExample_Views()'Thisexamplefindsthecurrentviewscollectionand'addsanewviewtothatcollection.DimviewCollAsAcadViewsSetviewColl=ThisDrawing.Views'Createaviewnamed"TEST"inthecurrentdrawingDimviewObjAsAcadViewSetviewObj=viewColl.Add("TEST")MsgBox"Anewviewcalled"&viewObj.name&"hasbeenaddedtotheviewscollection.",vbInformation,"ViewsExample"EndSub

VisibleExampleSubExample_Visible_AecBaseObject()

'ThisexampleaddsanAecPolygonobjecttothecurrentdrawing,'displaystheobject,thenturnstheobject'sVisibleproperty'toFalseandredisplaysthedrawing.

DimobjAsAcadObjectDimptAsVariantDimpolygonAsAecPolygon

'AddanAecPolygonobjecttothedrawing.Setpolygon=ThisDrawing.ModelSpace.AddCustomObject("AecPolygon")

'Selectalocationfortheobjectonscreen.pt=ThisDrawing.Utility.GetPoint(,"Selecttheinsertionpoint:")IfErr.Number0ThenMsgBox("errorwhengettingapoint."&vbCrLf)ExitSubEndIf

'Placetheobjectatthespecifiedpoint,thendisplay'amessagesothatuserscanseetheobject.polygon.Location=ptpolygon.UpdateMsgBox("AecPolygonaddedtodrawing.Nowyouseeit...")

'Maketheobjectinvisible,thendisplayamessagesothat'thedrawingisvisibleanduserscanseethatthe'objectisnolongervisible.polygon.Visible=Falsepolygon.UpdateMsgBox("...andnowyoudon't.")

'Maketheobjectvisibleagain,sothatuserscanmanipulate'itthroughtheuserinterface.polygon.Visible=True

polygon.Update

EndSub

VoidExampleSubExample_Void()

'ThisexamplewilldisplaytheiftheringisvoidornotDimdbAsNewAecBaseDatabaseDimringAsAecRingdb.InitThisDrawing.DatabaseSetring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingVoid?:"&ring.Void,vbInformation,"VoidExample"

EndSub

VolumeExampleSubExample_Volume()

'Thisexampleshowsthevolumeofamasselementormassgroup.

DimobjectAsObjectDimptAsVariantDimmassAsAecMassElementDimmassGroupAsAecMassGroupDimcountAsIntegerThisDrawing.Utility.GetEntityobject,pt,"SelectMassElementorMassGroup"IfTypeOfobjectIsAecMassGroupThenSetmassGroup=objectMsgBox"MassGroupvolume="&Format(massGroup.Volume,"###0.000"),vbInformation,"VolumeExample"ElseIfTypeOfobjectIsAecMassElementThenSetmass=objectMsgBox"MassElementvolume="&Format(mass.Volume,"###0.000"),vbInformation,"VolumeExample"ElseMsgBox"MassElementorGroupnotselected.",vbInformation,"VolumeExample"EndIfEndIf

EndSub

VolumeDisplayExampleSubExample_VolumeDisplayUnit()

'ThisexamplereturnstheVolumeDisplayUnitsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

'Convertthevolumedisplayunittoastring.

DimunitAsString

SelectCasedbPref.VolumeDisplayUnit

CaseaecUnitCubicInch

unit="cubicinch"

CaseaecUnitCubicFoot

unit="cubicfoot"

CaseaecUnitCubicYard

unit="cubicyard"

CaseaecUnitCubicMil

unit="cubicmillimeters"

CaseaecUnitCubicCentimeter

unit="cubiccentimeters"

CaseaecUnitCubicDecimeter

unit="cubicdecimeters"

CaseaecUnitCubicMeter

unit="cubicmeters"

EndSelect

MsgBox"ThecurrentvalueforVolumeDisplayUnitis"&unit,_

vbInformation,"VolumeDisplayUnitExample"

EndSub

VolumePrecisionExampleSubExample_VolumePrecision()

'ThisexampledisplaystheVolumePrecisionsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThecurrentvalueforVolumePrecisionis:"&dbPref.VolumePrecision,_

vbInformation,"VolumePrecisionExample"

EndSub

VolumeSuffixExampleSubExample_VolumeSuffix()

'ThisexampledisplaystheVolumeSuffixsettingforthecurrentdrawing.

DimdbPrefAsAecArchBaseDatabasePreferences

SetdbPref=AecArchBaseApplication.ActiveDocument.preferences

MsgBox"ThecurrentvalueforVolumeSuffixis"&dbPref.VolumeSuffix,_

vbInformation,"VolumeSuffixExample"

EndSub

WidthExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

lAecMassElement

SubExample_Width_AecLayoutGrid2D()

'Thisexampledisplaysthewidthofa2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridWidthis:"&grid.Width,vbInformation,"WidthExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"WidthExample"EndIf

EndSub

SubExample_Width_AecLayoutGrid3D()

'Thisexampledisplaysthewidthofa3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridWidthis:"&grid.Width,vbInformation,"WidthExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"WidthExample"EndIf

EndSub

SubExample_Width_AecMassElement()

'ThisexampleshowsthesizeofthemasselementinitsrelativeXdirection

DimobjAsObjectDimptAsVariantDimmassAsAecMassElementThisDrawing.Utility.GetEntityobj,pt,"SelectMassElement"

IfTypeOfobjIsAecMassElementThen</font>Setmass=objMsgBox"MassElementWidthis:"&mass.Width,vbInformation,"WidthExample"ElseMsgBox"NoMassElementsselected.",vbInformation,"WidthExample"EndIf

EndSub

WindowStateExampleSubExample_WindowState()'ThisexamplereadsanddisplaysthecurrentwindowstateoftheAutoCADapplication.

DimCurrentStateAsString'Usethe"WindowState"variabletodeterminethewindowstateofAutoCADSelectCaseWindowStateCaseacMin:CurrentState="Minimized"CaseacMax:CurrentState="Maximized"CaseacNorm:CurrentState="NormalSize"EndSelect

'DisplaywindowstateMsgBox"Theapplicationwindowisnow:"&CurrentStateEndSub

WindowTitleExampleSubExample_WindowTitle()

'Thisexamplecyclesthroughthedocumentscollection'andusestheWindowTitlepropertytocreatealistofallopendocuments.

DimDOCAsAecBaseDocumentDimaecAppAsNewAecBaseApplicationDimmsgAsString'InitializetheAecBaseapplicationobjectaecApp.InitThisDrawing.Application'Iftherearenoopendocuments,thenexitIfaecApp.Documents.count=0ThenMsgBox"Therearenoopendocuments!"ExitSubEndIfmsg=vbCrLf&vbCrLf'Startwithaspace'CyclethroughallopendrawingsandgetthewindowtitleofeachdrawingForEachDOCInaecApp.Documentsmsg=msg&DOC.WindowTitle&vbCrLfNext'DisplayalistofopendrawingsMsgBox"Theopendrawingtitlesare:"&msg

EndSub

XDistanceExampleSubExample_XDistance()

'Thisexamplewillmakeamasselementandandanchorit200units'fromthestartofaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.XDistance=200'settheXDistancefortheanchormass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

XEndoffsetExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_XEndoffset_AecLayoutGrid2D()

'ThisexampledisplaystheXendoffsetfora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridXEndOffsetis:"&grid.XEndOffset,vbInformation,"XEndOffsetExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"XEndOffsetExample"EndIf

EndSub

SubExample_XEndoffset_AecLayoutGrid3D()

'ThisexampledisplaystheXendoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXEndOffsetis:"&grid.XEndOffset,vbInformation,"XEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XEndOffsetExample"EndIf

EndSub

XNodesExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_XNodes_AecLayoutGrid2D()

'ThisexampledisplaysthenumberofXnodesofa2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridXNodesis:"&grid.XNodes.Count,vbInformation,"XNodesExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"XNodesExample"EndIf

EndSub

SubExample_XNodes_AecLayoutGrid3D()

'ThisexampledisplaysthenumberofXnodesofa3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXNodesis:"&grid.XNodes.Count,vbInformation,"XNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XNodesExample"EndIf

EndSub

XOffsetExampleSubExample_XOffset()

'ThisexampleshowstheXoffsetofthefirstviewblockofamultiviewblock

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefDimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"XOffsetofViewBlock1:"&viewBlocks.Item(0).XOffset,vbInformation,"XOffsetExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"XOffsetExample"EndIf

EndSub

XPositionFromExampleSubExample_XPositionFrom()

'Thisexamplewillmakeamasselementandanchorit200units'fromtheendofaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.XDistance=200'settheXDistancefortheanchoranchor.XPositionFrom=aecCurvePositionEnd'settheanchortomeasurefromtheendofthecurvemass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

XPositionToExampleSubExample_XPositionTo()

'Thisexamplewillmakeamasselementandandanchorit'scenter200units'fromtheendofaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.XDistance=200'settheXDistancefortheanchoranchor.XPositionFrom=aecCurvePositionEnd'settheanchortomeasurefromtheendofthecurveanchor.XPositionTo=aecEdgePositionCenter'settheanchortomeasuretothecenteroftheentitymass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

XRefEditExampleSubExample_XRefEdit()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'whetherthecurrentdrawingcanbeeditedinplacewhenbeing'referencedbyanotheruser.''Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.XRefEditMsgBox"TheXRefEditpreferenceissetto:"&originalValue

'ModifytheXRefEditpreferencebytogglingthevalueACADPref.XRefEdit=Not(ACADPref.XRefEdit)newValue=ACADPref.XRefEditMsgBox"TheXRefEditpreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.XRefEdit=originalValueMsgBox"TheXRefEditpreferencewasresetbackto:"&originalValueEndSub

XRefLayerVisibilityExampleSubExample_XRefLayerVisibility()'Thisexamplereadsandmodifiesthepreferencevaluewhichcontrols'thevisibilityofxref-dependentlayersandspecifiesifnestedxref'pathchangesaresaved.''Whenfinished,thisexampleresetsthepreferencevaluebackto'it'soriginalvalue.DimACADPrefAsAcadDatabasePreferencesDimoriginalValueAsVariant,newValueAsVariant'GettheuserpreferencesobjectSetACADPref=ThisDrawing.preferences'ReadanddisplaytheoriginalvalueoriginalValue=ACADPref.XRefLayerVisibilityMsgBox"TheXRefLayerVisibilitypreferenceissetto:"&originalValue

'ModifytheXRefLayerVisibilitypreferencebytogglingthevalueACADPref.XRefLayerVisibility=Not(ACADPref.XRefLayerVisibility)newValue=ACADPref.XRefLayerVisibilityMsgBox"TheXRefLayerVisibilitypreferencehasbeensetto:"&newValue

'Resetthepreferencebacktoit'soriginalvalue''*Note:Commentoutthislastsectiontoleavethechangeto'thispreferenceineffectACADPref.XRefLayerVisibility=originalValueMsgBox"TheXRefLayerVisibilitypreferencewasresetbackto:"&originalValueEndSub

XRotationExampleSubExample_XRotation()

'Thisexamplewillmakeamasselementandandanchorittoaline,'androtateitaroundtheXaxisoftheline45degreesDimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineeastheobject(curve)toanchortoanchor.XDistance=200'settheXDistancefortheanchoranchor.XRotation=Atn(1)'Rotateby45degrees(Atnof1is45degreesinradians)mass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

XStartOffsetExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_XStartOffset_AecLayoutGrid2D()

'ThisexampledisplaystheXstartoffsetfora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridXStartOffsetis:"&grid.XStartOffset,vbInformation,"XStartOffsetExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"XStartOffsetExample"EndIf

EndSub

SubExample_XStartOffset_AecLayoutGrid3D()

'ThisexampledisplaystheXstartoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXStartOffsetis:"&grid.XStartOffset,vbInformation,"XStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XStartOffsetExample"EndIf

EndSub

XTypeExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_XType_AecLayoutGrid2D()

'ThisexampledisplaystheXtypefora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSelectCasegrid.XTypeCase0:MsgBox"GridXTypeis:ManualSpacing",vbInformation,"XTypeExample"Case1:MsgBox"GridXTypeis:AutoSpacingEven",vbInformation,"XTypeExample"Case2:MsgBox"GridXTypeis:AutoSpacingBay",vbInformation,"XTypeExample"EndSelectElseMsgBox"Nota2DLayoutGrid",vbExclamation,"XTypeExample"EndIf

EndSub

SubExample_XType_AecLayoutGrid3D()

'ThisexampledisplaystheXtypefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSelectCasegrid.XTypeCase0:MsgBox"GridXTypeis:ManualSpacing",vbInformation,"XTypeExample"Case1:MsgBox"GridXTypeis:AutoSpacingEven",vbInformation,"XTypeExample"Case2:MsgBox"GridXTypeis:AutoSpacingBay",vbInformation,"XTypeExample"EndSelectElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XTypeExample"EndIf

EndSub

XValueExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_XValue_AecLayoutGrid2D()

'ThisexampledisplaystheXvaluefora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridXValueis:"&grid.XValue,vbInformation,"XValueExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"XValueExample"EndIf

EndSub

SubExample_XValue_AecLayoutGrid3D()

'ThisexampledisplaystheXvaluefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXValueis:"&grid.XValue,vbInformation,"XValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XValueExample"EndIf

EndSub

YAlignmentExampleSubExample_YAlignment()

'Thisexamplelooksatthewayaselectedobjectisanchored'inrelationtothebaselineofagridassembly.'Usethisexamplewithadrawingthatcontainsawindow'assemblyandoneormoreAECobjectsattachedtothe'assembly.DimentAsAcadEntityDimgeoAsAecGeoDimanchorAsAecAnchorDimalignmentAsStringOnErrorResumeNext'Handleerrorsincode.'Promptusertoselectanobject.ThisDrawing.Utility.GetEntityent,pt,"Selectobjectanchoredtowindowassembly:"'MakesureuserselectedanAECobject,andthattheobject'isanchoredtoagridassembly.IfentIsNothingThenMsgBox"Nothingwasselected.",vbExclamation,"YAlignmentExample"ElseIfTypeOfentIsAecGeoThenSetgeo=ent'Gettheanchortheobjectisattachedto.Setanchor=geo.GetAnchorOnErrorGoTo0IfanchorIsNothingThenMsgBox"Selectedobjectisnotanchored.",vbExclamation,"YAlignmentExample"ElseIfNotTypeOfanchorIsAecAnchorEntToGridAssemblyThenMsgBox"Objectisanchored,butnottoagridassembly.",vbExclamation,"YAlignmentExample"Else

SelectCaseanchor.YAlignmentCaseaecInfillAlignCenteredalignment="Centered."CaseaecInfillAlignFrontFlushalignment="Infrontofthebaseline."CaseaecInfillAlignBackFlushalignment="Inbackofthebaseline."CaseElsealignment="Unknown"EndSelectMsgBox"YAlignmentofobject:"&alignment,vbInformation,"YAlignmentExample"EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"YAlignmentExample"EndIf

EndSub

YDistanceExampleSubExample_YDistance()

'Thisexamplewillmakeamasselementandandanchorit200units'totheleftofaline.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.YDistance=200'settheYDistancefortheanchormass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

YEndOffsetExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_YEndOffset_AecLayoutGrid2D()

'ThisexampledisplaystheYendoffsetfora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridYEndOffsetis:"&grid.YEndOffset,vbInformation,"YEndOffsetExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"YEndOffsetExample"EndIf

EndSub

SubExample_YEndOffset_AecLayoutGrid3D()

'ThisexampledisplaystheYendoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYEndOffsetis:"&grid.YEndOffset,vbInformation,"YEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YEndOffsetExample"EndIf

EndSub

YNodesExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_YNodes_AecLayoutGrid2D()

'ThisexampledisplaysthenumberofYnodesfora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridYNodesis:"&grid.YNodes.Count,vbInformation,"YNodesExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"YNodesExample"EndIf

EndSub

SubExample_YNodes_AecLayoutGrid3D()

'ThisexampledisplaysthenumberofYnodesfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYNodesis:"&grid.YNodes.Count,vbInformation,"YNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YNodesExample"EndIf

EndSub

YOffsetExampleSubExample_YOffset()

'ThisexampleshowstheYoffsetofthefirstviewblockofamultiviewblock

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefDimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"YOffsetofViewBlock1:"&viewBlocks.Item(0).YOffset,vbInformation,"YOffsetExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"YOffsetExample"EndIf

EndSub

YPositionFromExampleSubExample_YPositionFrom()

'Thisexamplewillmakeamasselementandandanchorit200units'fromtheleftofaline.DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.YDistance=200'settheYDistancefortheanchoranchor.YPositionFrom=aecCurvePositionEnd'settheanchortomeasurefromtheendofthecurvemass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

YPositionToExampleSubExample_YPositionTo()

'Thisexamplewillmakeamasselementandandanchorit'scenter200units'fromtheleftofaline.DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.YDistance=200'settheYDistancefortheanchoranchor.YPositionTo=aecEdgePositionCenter'settheanchortomeasuretothecenteroftheentitymass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

YRotationExampleSubExample_YRotation()

'Thisexamplewilladdanchoranewmasselementtoa2Dlayoutgridinthe'drawing.DimgridAsAecLayoutGrid2DDimmassAsAecMassElementDimptAsVariantDimobjAsAcadObjectThisDrawing.Utility.GetEntityobj,pt,"Selectgridtoattachto"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSetmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")DimanchorAsNewAecAnchorEntToLayoutNodeanchor.Reference=grid'anchorthemasselementtothefirstnodeonthegridanchor.Node=1anchor.YRotation=Atn(1)'45degreesmass.AttachAnchoranchorElseMsgBox"NoLayoutGridselected",vbInformation,"NodeExample"EndIf

EndSub

YStartOffsetExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_YStartOffset_AecLayoutGrid2D()

'ThisexampledisplaystheYstartoffsetfora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridYStartOffsetis:"&grid.YStartOffset,vbInformation,"YStartOffsetExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"YStartOffsetExample"EndIf

EndSub

SubExample_YStartOffset_AecLayoutGrid3D()

'ThisexampledisplaystheYstartoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYStartOffsetis:"&grid.YStartOffset,vbInformation,"YStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YStartOffsetExample"EndIf

EndSub

YTypeExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_YType_AecLayoutGrid2D()

'ThisexampledisplaystheYtypefora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objSelectCasegrid.YTypeCase0:MsgBox"GridYTypeis:ManualSpacing",vbInformation,"YTypeExample"Case1:MsgBox"GridYTypeis:AutoSpacingEven",vbInformation,"YTypeExample"Case2:MsgBox"GridYTypeis:AutoSpacingBay",vbInformation,"YTypeExample"EndSelectElseMsgBox"Nota2DLayoutGrid",vbExclamation,"YTypeExample"EndIf

EndSub

SubExample_YType_AecLayoutGrid3D()

'ThisexampledisplaystheYtypefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSelectCasegrid.YTypeCase0:MsgBox"GridYTypeis:ManualSpacing",vbInformation,"YTypeExample"Case1:MsgBox"GridYTypeis:AutoSpacingEven",vbInformation,"YTypeExample"Case2:MsgBox"GridYTypeis:AutoSpacingBay",vbInformation,"YTypeExample"EndSelectElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YTypeExample"EndIf

EndSub

YValueExampleExamples:

lAecLayoutGrid2D

lAecLayoutGrid3D

SubExample_YValue_AecLayoutGrid2D()

'ThisexampledisplaystheYvaluefora2DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid2DThisDrawing.Utility.GetEntityobj,pt,"Selecta2DLayoutGrid"IfTypeOfobjIsAecLayoutGrid2DThenSetgrid=objMsgBox"GridYValueis:"&grid.YValue,vbInformation,"YValueExample"ElseMsgBox"Nota2DLayoutGrid",vbExclamation,"YValueExample"EndIf

EndSub

SubExample_YValue_AecLayoutGrid3D()

'ThisexampledisplaystheYvaluefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3D

ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYValueis:"&grid.YValue,vbInformation,"YValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YValueExample"EndIf

EndSub

ZDistanceExampleSubExample_ZDistance()

'Thisexamplewillmakeamasselementandandanchorit200units'abovealine.

DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.ZDistance=200'settheZDistancefortheanchormass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

ZEndOffsetExampleSubExample_ZEndOffset()

'ThisexampledisplaystheZendoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZEndOffsetis:"&grid.ZEndOffset,vbInformation,"ZEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZEndOffsetExample"EndIf

EndSub

ZNodesExampleSubExample_ZNodes()

'ThisexampledisplaysthenumberofZnodesfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZNodesis:"&grid.ZNodes.Count,vbInformation,"ZNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZNodesExample"EndIf

EndSub

ZOffsetExampleSubExample_ZOffset()

'ThisexampleshowstheZoffsetofthefirstviewblockofamultiviewblock

DimobjAsObjectDimptAsVariantDimblockRefAsAecMVBlockRefDimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"ZoffsetofViewBlock1:"&viewBlocks.Item(0).ZOffset,vbInformation,"ZOffsetExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"ZOffsetExample"EndIf

EndSub

ZoomExampleSubExample_Zoom()

'ThisexampledisplaysthezoomofaselectedAecCameraobjectDimobjAsObjectDimptAsVariantDimcameraAsAecCameraThisDrawing.Utility.GetEntityobj,pt,"SelectaCamera"IfTypeOfobjIsAecCameraThenSetcamera=objMsgBox"Zoomis:"&camera.Zoom,vbInformation,"ZoomExample"ElseMsgBox"NotaCamera",vbExclamation,"ZoomExample"EndIf

EndSub

ZPositionFromExampleSubExample_ZPositionFrom()'Thisexamplewillmakeamasselementandandanchorit200units'abovealine.DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000

Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.ZDistance=-200'settheZDistancefortheanchoranchor.ZPositionFrom=aecCurvePositionEnd'settheanchortomeasurefromtheendofthecurvemass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

ZPositionToExampleSubExample_ZPositionTo()'Thisexamplewillmakeamasselementandandanchorit'scenter200units'abovealine.DimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineastheobject(curve)toanchortoanchor.ZDistance=-200'settheZDistancefortheanchoranchor.ZPositionFrom=aecCurvePositionEnd'settheanchortomeasurefromtheendofthecurveanchor.ZPositionTo=aecEdgePositionCenter'settheanchortomeasuretothecenteroftheentitymass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

ZRotationExampleSubExample_ZRotation()

'Thisexamplewillmakeamasselementandandanchorittoaline,'androtateitaroundtheZaxisoftheline45degreesDimmassAsAecMassElementDimlineAsAcadLineDimanchorAsNewAecAnchorEntToCurveDimpt1(0To2)AsDoubleDimpt2(0To2)AsDoublept2(0)=1000:pt2(1)=1000'thismakesanewmasselement120x120x120at0,0,0Setmass=ThisDrawing.ModelSpace.AddCustomObject("AecMassElement")'drawsalinefrom0,0to1000,1000Setline=ThisDrawing.ModelSpace.AddLine(pt1,pt2)anchor.Reference=line'setthelineeastheobject(curve)toanchortoanchor.ZDistance=200'settheZDistancefortheanchoranchor.ZRotation=Atn(1)'Rotateby45degrees(Atnof1is45degreesinradians)mass.AttachAnchoranchor'attachtheanchortothemasselement

EndSub

ZStartOffsetExampleSubExample_ZStartOffset()

'ThisexampledisplaystheZstartoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZStartOffsetis:"&grid.ZStartOffset,vbInformation,"ZStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZStartOffsetExample"EndIf

EndSub

ZTypeExampleSubExample_ZType()

'ThisexampledisplaystheZtypefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objSelectCasegrid.ZTypeCase0:MsgBox"GridZTypeis:ManualSpacing",vbInformation,"ZTypeExample"Case1:MsgBox"GridZTypeis:AutoSpacingEven",vbInformation,"ZTypeExample"Case2:MsgBox"GridZTypeis:AutoSpacingBay",vbInformation,"ZTypeExample"EndSelectElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZTypeExample"EndIf

EndSub

ZValueExampleSubExample_ZValue()

'ThisexampledisplaystheZvaluefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZValueis:"&grid.ZValue,vbInformation,"ZValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZValueExample"EndIf

EndSub

ForceHorizontalPropertySpecifieswhetherthetagisalignedwiththeobjectororientedhorizontally.

SeeAlso|Example

Signature

object.ForceHorizontal

objectAecAnchorExtendedTagToEntTheobjectthispropertyappliesto.

ForceHorizontalBoolean;read-writeTRUE:Orientthetaghorizontally.FALSE:Alignthetagwiththeobject.

TrueColorPropertyReturnsthetruecoloroftheobject.

SeeAlso|Example

Signature

object.TrueColor

objectAec2DSection,AecBlockRef,AecCamera,AecCellLayoutTool,AecClipVol,AecClipVolRes,AecDisplayComponentEntity,AecEditInPlaceProfile,AecEntity,AecEntRef,AecGeo,AecGridAssembly,AecLayoutCurve,AecLayoutGrid2D,AecLayoutGrid3D,AecLayoutTool,AecMaskBlockRef,AecMassElement,AecMassGroup,AecMvBlockRef,AecPolygon,AecSlice,AecVolumeLayoutToolTheobjectorobjectsthispropertyappliesto.

TrueColorAcadAcCmColorobject;read-onlyAutoCADTrueColorobject.

ActiveConfigurationPropertyReturnstheactivedisplayconfigurationforthespecifiedviewport.

SeeAlso|Example

Signature

RetVal=object.ActiveConfiguration(ViewPort)

objectAecDisplayConfigurationsTheobjectthispropertyappliesto.

ViewPortAcadObject;input-onlyTheAcadViewportorAcadPViewportthatthedisplayconfigurationappliesto.

RetValAecDisplayConfigurationTheactivedisplayconfigurationforthespecifiedviewport.

AddOverrideMethodAddsanobjectorstyleoverrideonthedisplayrepresentation.

SeeAlso|Example

Signature

RetVal=object.AddOverride(AecObject)

ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.

AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.

RetValAecDisplayPropertiesTheoverridedisplaypropertiesforthedisplayrepresentation.

Remarks

Thismethodwillfailifanoverrideisalreadyattached.

DeleteOverrideMethodDeletesanexistingoverridefromthedisplayrepresentation.

SeeAlso|Example

Signature

object.DeleteOverrideAecObject

ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.

AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.

Remarks

Thismethodwillfailifthereisnoexistingoverridetoremove.

DuplicateMethodCreatesaduplicatedisplayrepresentation.

SeeAlso|Example

Signature

RetVal=object.DuplicateUniqueName

ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.

UniqueNameString;input-onlyTheuniquenameforthenewdisplayrepresentation.

RetValAecDisplayRepresentationTheduplicateddisplayrepresentation.

Remarks

Thismethodwillfailifthenameisnotunique.

SeeAlso

MethodsandProperties:

ImportFreeFormmethod

SeeAlso

MethodsandProperties:

ExportFreeFormmethod

Collections

AecLayerKeys

AecLayerKeyStyles

AecLayerOverrideSettings

AecLayoutCurveNodes

AecLayoutGrid2DNodes

AecLayoutGrid2DXNodes

AecLayoutGrid2DYNodes

AecLayoutGrid3DNodes

AecLayoutGrid3DXNodes

AecLayoutGrid3DYNodes

AecLayoutGrid3DZNodes

AecLayoutNodes

AecMaskBlockStyles

AecMassElementStyles

AecMassGroups

AecMVBlockStyles

AecMVBlockStyles

AecPolygonStyles

AecProfileStyles

AecRings

AecViewBlocks

ACAD_ANGLEdatatypeACAD_ANGLEisaDOUBLEwhoseunitsarebasedontheAUNITSsystemvariable,andwhoseprecisionisbasedontheAUPRECsystemvariable.

SeeAlso:

MethodsandProperties:

AngleToStringmethod

AutoCADActiveXandVBADeveloper'sGuide:

CalculatingPointsandValues

SeeAlso:

MethodsandProperties:

AngleToStringmethod

AutoCADActiveXandVBADeveloper'sGuide:

CalculatingPointsandValues

SeeAlso:

MethodsandProperties:

AngleToStringmethod

AutoCADActiveXandVBADeveloper'sGuide:

CalculatingPointsandValues

Theviewdirectionforagivendisplayset.

AecViewDirection

Name Value DescriptionaecViewDirectionTop 0 Top

aecViewDirectionBottom 1 Bottom

aecViewDirectionLeft 2 Left

aecViewDirectionRight 3 Right

aecViewDirectionFront 4 Front

aecViewDirectionBack 5 Back

aecViewDirectionModel 6 Model

AecViewDirection

Thefixedviewdirectionusedbyadisplayconfiguration.

AecFixedViewDirection

Name Value DescriptionaecFixedViewDirectionTop 0 Top

aecFixedViewDirectionBottom 1 Bottom

aecFixedViewDirectionLeft 2 Left

aecFixedViewDirectionRight 3 Right

aecFixedViewDirectionFront 4 Front

aecFixedViewDirectionBack 5 Back

aecFixedViewDirectionViewport 6 Viewport

AecFixedViewDirection

Thehatchtypeusedbyadisplaycomponent.

AecHatchType

Name Value DescriptionaecHatchTypeUserDefined 0 UserDefined

aecHatchTypePreDefined 1 PreDefined

aecHatchTypeCustomDefined 2 CustomDefined

aecHatchTypeSolidFill 3 SolidFill

AecHatchType

Thesurfacehatchplacement.

AecSurfaceHatchPlacement

Name Value DescriptionaecSurfaceHatchPlacementTop 1 Top

aecSurfaceHatchPlacementBottom 2 Bottom

aecSurfaceHatchPlacementLeft 3 Left

aecSurfaceHatchPlacementRight 4 Right

aecSurfaceHatchPlacementFront 5 Front

aecSurfaceHatchPlacementBack 6 Back

AecSurfaceHatchPlacement

Thesurfacemappingtype.

AecSurfaceMappingType

Name Value DescriptionaecSurfaceMappingTypeDefaultMapping 0 DefaultMapping

aecSurfaceMappingTypeFaceMapping 1 FaceMapping

aecSurfaceMappingTypeAsSurfaceHatch 2 AsSurfaceHatch

AecSurfaceMappingType

ACAD_DISTANCEdatatypeACAD_DISTANCEisaDOUBLEwhoseunitsarebasedontheLUNITSsystemvariable,andwhoseprecisionisbasedontheLUPRECsystemvariable.

top related