Page 1
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
Page 2
currentsession.
AecBasePreferencesAECAutoCADpreferencesobject.
AecBlockRefAninstanceofanAECblockinadrawing.
AecCameraAECcameraobject.
AecCellLayoutToolBaseClassforthelayoutgridobjects.
AecClipVolClipVolumeentitydefininganextrudedregionforclipping.
AecClipVolResClipVolumeResultwhichcapturestheresultinggraphicsforasectionorelevationforinsertionintothedrawing.
AecDatabaseAECDatabaseobjectextendingtheAcadDatabaseobject.
AecDatabasePreferencesExtendstheAutoCADDatabasePreferencesobjecttoincludeAECpropertiesandmethods.
AecDictionaryAECDictionarycontainingacollectionofAECobjects.
AecDictRecordAnAECDictionaryitem.
AecEditInPlaceProfileIn-placeeditprofileobject.
AecEntityBaseclassforallAECentities.
AecEntRefAreferencetoanyentityinthedrawing,similartoablockreference.
AecGeoProvideslocation,rotationandanchoringcapabilitiesforAECentities.
AecGridAssemblyBaseclassforgridassemblies.
AecLayerKeyLayerkeydefinition,whichspecifiesthelayerpropertiesgeneratedfromaparticularkey.
AecLayerKeysThecollectionoflayerkeydefinitionsinalayerkeystyle.
Page 3
AecLayerKeyStyleAcollectionoflayerkeys.
AecLayerKeyStylesThecollectionoflayerkeystylesinthespecifieddrawing.
AecLayerOverrideSettingAlayerkeystyleoverridesetting.
AecLayerOverrideSettingsThecollectionofoverridesettingsinalayerkeystyle.
AecLayoutCurveAsingledimensionalgridwithnodesalongasinglecurve.
AecLayoutCurveNodeAnodeinalayoutcurve.
AecLayoutCurveNodesThecollectionofnodesinalayoutcurve.
AecLayoutGrid2DLayoutgridentityusedtolayoutanyAECobjectwithina2Dgrid.
AecLayoutGrid2DNodeAnodeina2Dlayoutgrid.
AecLayoutGrid2DNodesThecollectionofnodesina2Dlayoutgrid.
AecLayoutGrid2DXNodeAnodealongtheXaxisofa2Dlayoutgrid.
AecLayoutGrid2DXNodesCollectionofnodesalongtheXaxisofa2Dlayoutgrid.
AecLayoutGrid2DYNodeAnodealongtheYaxisofa2Dlayoutgrid.
AecLayoutGrid2DYNodesCollectionofnodesalongtheYaxisofa2Dlayoutgrid.
AecLayoutGrid3DAlayoutvolumeforarrangingobjectsina3Dgrid.
AecLayoutGrid3DNodeAnodeofa3DLayoutGrid.
AecLayoutGrid3DNodesThecollectionofnodesina3Dlayoutgrid.
AecLayoutGrid3DXNodeAnodealongtheXaxisofalayoutvolume.
Page 4
AecLayoutGrid3DXNodesCollectionofnodesalongtheXaxisofalayoutvolume.
AecLayoutGrid3DYNodeAnodealongtheYaxisofalayoutvolume.
AecLayoutGrid3DYNodesCollectionofnodesalongtheYaxisofalayoutvolume.
AecLayoutGrid3DZNodeAnodealongtheZaxisofalayoutvolume.
AecLayoutGrid3DZNodesCollectionofnodesalongtheZaxisofalayoutvolume.
AecLayoutNodeProvidescommonpropertiessharedbyalltypesoflayoutnodes.
AecLayoutNodesCollectionoflayoutnodes.
AecLayoutToolProvidescommonfunctionalityforlayoutcurveandlayoutgridobjects.
AecMaskBlockRefAninstanceofamaskblock,atwo-dimensionalblockthatcoverspartofanAECobjectinaplan(2D)view.
AecMaskBlockStyleDefinesthepropertiesofamaskblockobject.
AecMaskBlockStylesThecollectionofmaskblockstylesinthespecifieddrawing.
AecMassElementAnobjectthathasbehaviorsbasedonitsshape.
AecMassElementStyleDefinesthepropertiesofamasselementobject.
AecMassElementStylesThecollectionofmasselementstylesinthespecifieddrawing.
AecMassGroupAgroupofmasselementscombinedtoformacomplexshape.
AecMassGroupsThecollectionofmassgroupsinthespecifieddrawing.
Page 5
AecMVBlockRefAninstanceofablockthatcanhavedifferentrepresentationsindifferentviewdirections.
AecMVBlockStyleDefinesthepropertiesofamulti-viewblockobject.
AecMVBlockStylesThecollectionofmulti-viewblockstylesinthespecifieddrawing.
AecObjectProvidescommonfunctionalityforAECdatabaseobjects.
AecPolygonAnAecPolygonobject.
AecPolygonStyleDefinesthepropertiesofanAecPolygonobject.
AecPolygonStylesThecollectionofAecPolygonstylesinthespecifieddrawing.
AecProfileDefinesthepropertiesofaprofilestyle.
AecProfileStyleAcustomshapedefinedbytwo-dimensionalclosedpolylines.
AecProfileStylesThecollectionofprofilestylesinthespecifieddrawing.
AecRingAclosedloopofpolylinesegments,oftenusedasagroupinsideanAecProfileobject.
AecRingsThecollectionofringsinanAecProfileobject.
AecSliceSliceofamassinggrouporanyAECobject,typicallyusedtogeneratefloorplatesandspaceboundaries.
AecViewBlockViewblockusedfordisplayrepresentationsbyamulti-viewblock.
AecViewBlocksAcollectionofviewblocksusedfordisplayrepresentationsbyamulti-viewblock.
AecVolumeLayoutToolProvidesstandardfunctionalityforall3Dlayouttools.
Page 6
AECBaseObjectModel
Clickonanobjecttoviewthedescription.
Page 8
2DSectionObject
AEC2Dsectionobject.
VBAobjectname: Aec2dSection
Createusing: AddCustomObject("Aec2dSection")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Copy
Properties
Application
ClipVol
Description
Page 9
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
Page 10
AnchorObject
BaseclassforallAECanchorobjects.
VBAobjectname: AecAnchor
Createusing: NewAecAnchor
Accessvia: AecGeo.GetAnchor
YoucanuseAecAnchorasagenericreferencetoanchorobjects.
Methods
AttachEntity
Delete
GetExtensionDictionary
GetXData
Properties
Application
Description
Document
Handle
HasExtensionDictionary
Events
Modified
Page 11
GetXData
SetXDataObjectID
ObjectName
OwnerID
Page 12
AnchorEntitytoCurveObject
BindsoneAECobjecttoanotherAECorAutoCADobject,suchasaroof,wall,line,orarc.
VBAobjectname: AecAnchorEntToCurve
Createusing: NewAecAnchorEntToCurve
Accessvia: AecGeo.GetAnchor
Properties
Application
Description
Document
FlipX
FlipY
Page 13
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
Page 14
AecAnchorEntToEntObject
BindsoneAECobjecttoanother.
VBAobjectname: AecAnchorEntToEnt
Createusing: NewAecAnchorEntToEnt
Accessvia: AecGeo.GetAnchor
Methods
AttachEntity
Delete
GetExtensionDictionary
Properties
Application
Description
Document
Handle
HasExtensionDictionary
Events
Modified
Page 15
GetXData
SetXData
ObjectID
ObjectName
OwnerID
Reference
Page 16
AnchorEntitytoGridAssemblyObject
Attachesentityobjects,suchasdoorsandwindows,togridassemblies,suchascurtainwallsandwindowassemblies.
VBAobjectname: AecAnchorEntToGridAssembly
Createusing: N/A
Accessvia: AecGeo.GetAnchor
Properties
AdjustSizing
AllowVariation
Application
BottomOffset
Cell
Page 17
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
Page 18
AnchorEntitytoLayoutCellObject
Attachesobjectstocellsona2Dlayoutgrid.
VBAobjectname: AecAnchorEntToLayoutCell
Createusing: NewAecAnchorEntToLayoutCell
Accessvia: AecGeo.GetAnchor
Properties
Application
ApplyResize
CenterOnNode
Description
Document
Page 19
Methods
AttachEntity
Delete
GetExtensionDictionary
GetXData
SetXData
FlipX
FlipY
FlipZ
Handle
HasExtensionDictionary
Node
ObjectID
ObjectName
Offset
OwnerID
Reference
ResizeOffset
UseNodeCS
XRotation
YRotation
ZRotation
Events
Modified
Page 20
AnchorEntitytoLayoutNodeObject
Attachesobjects,suchascolumns,tonodesonalayoutgrid.
VBAobjectname: AecAnchorEntToLayoutNode
Createusing: NewAecAnchorEntToLayoutNode
Accessvia: AecGeo.GetAnchor
Properties
Application
CenterOnNode
Description
Document
FlipX
Page 21
Methods
AttachEntity
Delete
GetExtensionDictionary
GetXData
SetXData
FlipY
FlipZ
Handle
HasExtensionDictionary
Node
ObjectID
ObjectName
Offset
OwnerID
Reference
UseNodeCS
XRotation
YRotation
ZRotation
Events
Modified
Page 22
AnchorEntitytoLayoutVolumeObject
Attachesobjectstovolumesona3Dlayoutgrid.
VBAobjectname: AecAnchorEntToLayoutVolume
Createusing: NewAecAnchorEntToLayoutVolume
Accessvia: AecGeo.GetAnchor
Properties
Application
ApplyResize
CenterOnNode
Description
Document
Page 23
Methods
AttachEntity
Delete
GetExtensionDictionary
GetXData
SetXData
FlipX
FlipY
FlipZ
Handle
HasExtensionDictionary
Node
ObjectID
ObjectName
Offset
OwnerID
Reference
ResizeOffset
UseNodeCS
XRotation
YRotation
ZRotation
Events
Modified
Page 24
AecAnchorExtendedTagToEntObject
Attachesatagtoanobjecttodisplayscheduledata.
VBAobjectname: AecAnchorExtendedTagToEnt
Createusing: NewAecAnchorExtendedTagToEnt
Accessvia: AecGeo.GetAnchor
ThisobjectisavailableifthedrawingcontainsanyMVBlockstyles.
Methods
AttachEntity
Delete
Properties
Application
Description
Document
ForceHorizontal
Page 25
Delete
GetExtensionDictionary
GetXData
SetXData
Handle
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Reference
Page 26
AnchorLeaderEntitytoNodeObject
Connectsanobjecttoalayoutnodewithaleaderbetweenthetwoobjects.
VBAobjectname: AecAnchorLeadEntToNode
Createusing: NewAecAnchorLeadEntToNode
Accessvia: AecGeo.GetAnchor
Properties
AngleFromNode
Application
CenterOnNode
Description
Document
Page 27
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
Page 28
AnchortoReferenceObject
Baseclassforreferencingobjectsfromananchor.
VBAobjectname: AecAnchorToRef
Createusing: NewAecAnchorToRef
Accessvia: AecGeo.GetAnchor
Methods
AttachEntity
Delete
GetExtensionDictionary
Properties
Application
Description
Document
Handle
HasExtensionDictionary
Events
Modified
Page 29
GetXData
SetXData
ObjectID
ObjectName
OwnerID
Reference
Page 30
AecBaseApplicationObject
ApplicationobjectextendingAcadApplicationtoprovidesupportforAECApplications.
VBAobjectname: AecBaseApplication
Createusing:
ForVB:GetObject("Acad.Application")orCreateObject("Acad.Application")thenGetInterfaceObject("AecBase.Application")
ForVBA:notapplicable.Theapplicationisalwaysavailable.
Accessvia: ApplicationProperty
ThepropertiesassociatedwiththeAecBaseApplicationobjectreflectthepropertiesofthemainapplicationwindow.Themethodscontroltheloadingorlistingofthecurrentlyloadedexternalapplicationsandinterfaceobjects.
Page 31
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
Page 32
ZoomPrevious
ZoomScaled
ZoomWindow
Width
WindowLeft
WindowState
WindowTop
Page 33
AecBaseDatabaseObject
AECdatabaseobjectextendingAcadDatabasetoprovidesupportforgeneralAECobjects.
VBAobjectname: AecBaseDatabase
Createusing: N/A
Accessvia: ModelSpace.Item
Note:AllpropertiesandmethodsoftheAecBaseDatabaseobjectareavailablethroughtheAecBaseDocumentobject.
Properties
Blocks
Dictionaries
DimStyles
Page 34
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
Page 35
ProfileStyles
RegisteredApplications
TextStyles
UserCoordinateSystems
Viewports
Views
Page 36
AecBaseDatabasePreferencesObject
AderivativeofAecDatabasePreferences,providingbasedesktopdatabasepreferencessupport.
VBAobjectname: AecBaseDatabasePreferences
Createusing: N/A
Accessvia: AecBaseDatabase.PreferencesAecBaseDocument.Preferences
Properties
AllowLongSymbolNames
AlwaysImportLayerStandard
AngularAzimuth
AngularDisplayFormat
AngularPrecision
Page 37
Methods
ConvertToCurrentAreaDisplay
AngularPrecision
Application
AreaDisplayUnit
AreaPrecision
AreaSuffixBasePoint
BasePointNE
BlockBasedLayerOffBehavior
ContourLinesPerSurface
CoordinatePrecision
CreateDimscaleOverride
Database
DatabaseScale
DisplaySilhouette
ElevationPrecision
FacetDeviation
FacetMaxiumum
LayerFile
LayerStandard
LinearDisplayFormat
LinearPrecision
Page 38
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
Page 39
VerticalScale
VolumeDisplayUnit
VolumePrecision
VolumeSuffix
XRefEdit
XRefLayerVisibility
XrefOverlaysUseOwnDisplayConfig
Page 40
AecBaseDocumentObject
AnAECdrawingobject,extendingtheAcadDocumenttoprovidesupportforgeneralAECobjects.
Note:ThisobjectisactuallyacomponentoftheAecXUIBaseobjectmodel,whichrepresentsuserinterfaceobjects.
VBAobjectname: AecBaseDocument
Createusing:Documents.AddDocuments.OpenDocument.New
Accessvia: Documents.ItemApplication.ActiveDocument
ThePreferencespropertyprovidesaccesstodrawingsettings.
TheactivedocumentcanbeaccessedthroughtheActiveDocumentpropertyoftheAecBaseApplicationobject,afterinitializing
Page 41
AecBaseApplication.Forexample:
DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocument
Properties
Active
ActiveDimStyle
ActiveLayer
ActiveLayout
ActiveLinetype
ActivePViewport
ActiveSelectionSet
ActiveSpace
ActiveTextStyle
ActiveUCS
ActiveViewport
Application
Blocks
Database
Dictionaries
Page 42
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
Page 43
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
Page 44
Width
WindowState
WindowTitle
Page 45
AecBaseDocumentsCollection
ThecollectionofallAECdrawingsopeninthecurrentsession.
Note:ThisobjectisactuallyacomponentoftheAecXUIBaseobjectmodel,whichrepresentsuserinterfaceobjects.
VBAobjectname: AecBaseDocuments
Createusing: N/A
Accessvia: AecBaseApplication.Documents
Methods
Add
Close
Init
Item
Properties
Application
Count
Page 47
AecBasePreferencesObject
AECAutoCADpreferencesobject.
VBAobjectname: AecBasePreferences
Createusing: N/A
Accessvia: AecBaseApplication.Preferences
TheAecBasePreferencesobjectholdsalltheoptionsstoredexternaltothedrawing,suchasUserPreferences.Theoptionsarestoredinseparateobjects,groupedbycategory.UsethepropertiesoftheAecBasePreferencesobjecttoaccesseachcategory.
OptionsthatresideinthedrawingcanbeaccessedthroughtheAecBaseDatabasePreferencesobject.
Currently,AecBasePreferencesdoesnotprovideaccesstoAEC-specificoptions;itisequivalenttoAcadPreferences.RefertoAcadPreferencesintheAutoCADActiveXandVBAReferenceforinformationaboutthis
Page 48
object'smethodsandproperties.
Methods
Init
Properties
Application
Display
Drafting
Files
OpenSave
Output
Profiles
Selection
System
User
Page 49
AECBlockObject
AninstanceofanAECblockinadrawing.
VBAobjectname: AecBlockRef
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
AecBlockRefisthebaseobjectfortheAecMVBlockRefandAecMaskBlockRefobjects.
Methods
ArrayPolar
ArrayRectangular
Properties
Application
Color
Description
Page 50
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
Page 51
CameraObject
AECcameraobject.
VBAobjectname: AecCamera
Createusing: AddCustomObject("AecCamera")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Properties
Application
Color
Description
Document
Page 52
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
Page 53
CellLayoutToolObject
BaseClassforthelayoutgridobjects.
VBAobjectname: AecCellLayoutTool
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Thisisthebaseclassforallrectangularcelllayouttools,includingAecLayoutGrid2DandAecLayoutGrid3d.YoucanuseAecCellLayoutToolasagenericreferencetolayoutgridobjects.
Methods
ArrayPolarProperties
Page 54
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
Page 56
ClipVolumeObject
ClipVolumeentitydefininganextrudedregionforclipping.
VBAobjectname: AecClipVol
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
ThisisthebaseclassforADTbuildingelevationandsectionlineobjects.
Methods
ArrayPolar
Properties
Angle1
Angle2
Application
Page 57
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
Page 58
TransformBy
Update
Side2
TrueColor
UseModelExtents
Visible
Page 59
ClipVolumeResultObject
ClipVolumeResultwhichcapturestheresultinggraphicsforasectionorelevationforinsertionintothedrawing.
VBAobjectname: AecClipVolRes
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
ThisisthebaseclassfortheADTsectionlineobject.
Methods
ArrayPolar
ArrayRectangular
Properties
Application
Page 60
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
Page 61
AecDatabaseObject
AECDatabaseobjectextendingtheAcadDatabaseobject.
VBAobjectname: AecDatabase
Createusing: N/A
Accessvia: ModelSpace.Item
Note:AccessallpropertiesandmethodsoftheAecDatabaseobjectthroughtheAecBaseDocumentobject.
Properties
Blocks
Dictionaries
DimStyles
ElevationModelSpace
ElevationPaperSpace
Page 62
Methods
CopyObjects
HandleToObject
Init
ObjectIdToObject
ElevationPaperSpace
Groups
Layers
Layouts
Limits
Linetypes
ModelSpace
PaperSpace
PlotConfigurations
Preferences
RegisteredApplications
TextStyles
UserCoordinateSystems
Viewports
Views
Page 63
AecDatabasePreferencesObject
ExtendstheAutoCADDatabasePreferencesobjecttoincludeAECpropertiesandmethods.
VBAobjectname: AecDatabasePreferences
Createusing: N/A
Accessvia: ModelSpace.Item
Note:UseAecBaseDatabasePreferencesinsteadofAecDatabasePreferences.
Properties
AllowLongSymbolNames
Application
ContourLinesPerSurface
Page 64
Methods
Init
DisplaySilhouette
Lineweight
LineWeightDisplay
MaxActiveViewports
ObjectSortByPlotting
ObjectSortByPSOutput
ObjectSortByRedraws
ObjectSortByRegens
ObjectSortBySelection
ObjectSortBySnap
OLELaunch
RenderSmoothness
SegmentPerPolyline
SolidFill
TextFrameDisplay
XRefEdit
XRefLayerVisibility
Page 65
AecDictionaryObject
AECDictionarycontainingacollectionofAECobjects.
VBAobjectname: AecDictionary
Createusing: N/A
Accessvia: N/A
AecDictionaryisthebaseclassforAECstylecollections,suchasAecLayerKeyStylesandAecMaskBlockStyles.ThesecollectionscanbeaccessedfromtheAecBaseDocumentobject.
Methods
Delete
GetExtensionDictionary
GetXData
Properties
Application
Count
Document
HandleEvents
Page 66
Has
Remove
Rename
SetXData
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Modified
Page 67
AecDictionaryRecordObject
AnAECDictionaryitem.
VBAobjectname: AecDictRecord
Createusing: N/A
Accessvia: N/A
ThisisthebaseclassforallAECStyleobjects,suchasAecLayerKeyStyleandAecMaskBlockStyle.
Methods
Delete
Properties
AlternateName
Application
Description
Document
Page 68
Delete
GetExtensionDictionary
GetXData
SetXData
Document
Handle
HasExtensionDictionary
Name
ObjectID
ObjectName
OwnerID
Events
Modified
Page 69
AecDisplayComponentObject
AnentityorhatchcomponentofatheAecDisplayComponentscollection.
VBAobjectname: AecDisplayComponent
Createusing: N/A
Accessvia: AecDisplayComponents.Item
AecDisplayComponentisabaseclass.ThederivedclassesareAecDisplayComponentEntityorAecDisplayComponentHatch.ChecktheobjecttypereturnedbytheAecDisplayComponents.Itemfortheunderlyingobject.
Methods
Properties
Index
Name Events
Page 71
AecDisplayComponentEntityObject
Theentitypropertiesforthedisplaycomponent.
VBAobjectname: AecDisplayComponentEntity
Createusing: N/A
Accessvia: AecDisplayComponents.Item
AecDisplayComponentEntityisaderivedclass.AecDisplayComponentisthebaseclass.CheckthetypereturnedbytheAecDisplayComponents.Itemmethodfortheunderlyingobject.
Properties
AllowByMaterial
ByMaterial
Index
Page 72
Methods
Layer
Linetype
Linetypescale
LineWeight
Name
Owner
PlotStyleName
TrueColor
Visible
Events
Page 73
AecDisplayComponentHatchObject
Thehatchpropertiesforthedisplaycomponent.
VBAobjectname: AecDisplayComponentHatch
Createusing: N/A
Accessvia: AecDisplayComponents.Item
AecDisplayComponentHatchisaderivedclass.AecDisplayComponentisthebaseclass.CheckthetypereturnedbytheAecDisplayComponents.Itemmethodfortheunderlyingobject.
Properties
Angle
DoubleHatch
HatchType
Page 74
Methods
Index
Name
Owner
PatternName
Scale
Spacing
UseAngleOfObject
XOffset
YOffset
Events
Page 75
AecDisplayComponentsCollection
Thecollectionofdisplaycomponentsinadisplayrepresentation.
VBAobjectname: AecDisplayComponents
Createusing: N/A
Accessvia: AecDisplayProperties.DisplayComponents
ThedisplaycomponentscollectioncontainsAecDisplayComponentEntityandAecDisplayComponentHatchobjects.
Methods
Item
Properties
Count
Owner
Events
Page 76
AecDisplayConfigurationObject
Adisplayconfiguration.
VBAobjectname: AecDisplayConfiguration
Createusing: N/A
Accessvia: AecDisplayConfiguration.Item
Methods
Properties
AlternameName
CutPlaneDisplayAbove
CutPlaneDisplayBelow
CutPlaneHeight
DisplaySet
Events
Modified
Page 77
FixedViewDirection
Name
UseFixedViewDirection
Page 78
AecDisplayConfigurationsObject
Acollectionofdisplayconfigurations.
VBAobjectname: AecDisplayConfigurations
Createusing: N/A
Accessvia: AecBaseDatabase.DisplayConfigurationsAecBaseDocument.DisplayConfigurations
Methods
Add
Has
Import
Item
Remove
Properties
ActiveConfiguration
Count
Events
Modified
Page 80
AecDisplayPropertiesObject
Acollectonofdisplaypropertiesforadisplayrepresentation.
VBAobjectname: AecDisplayProperties
Createusing: N/A
Accessvia: AecDisplayRepresentation.DefaultDisplayPropertiesAecDisplayRepresentation.OverrideDisplayProperties
UsetheAecDisplayPropertiescollectiontoaccessthematerialproperties,entitycomponentpropertiesandhatchcomponentpropertiesofthedisplayrepresentation.
AecDisplayPropertiesisabaseclass.ThederivedclassisAecDisplayPropertiesMaterial.CheckthetypereturnedbytheDefaultDisplayPropertiesmethodandOverrideDisplayPropertiesmethodfortheunderlyingobject.
Properties
Page 81
MethodsDisplayComponents Events
Page 82
AecDisplayPropertiesMaterialObject
Thematerialdisplaypropertiesforadisplayrepresentation.
VBAobjectname: AecDisplayPropertiesMaterial
Createusing: N/A
Accessvia: AecDisplayRepresentation.DefaultDisplayPropertiesAecDisplayRepresentation.OverrideDisplayProperties
AecDisplayPropertiesMaterialisaderivedclass.AecDisplayPropertiesisthebaseclass.CheckthetypereturnedbytheDefaultDisplayPropertiesmethodandOverrideDisplayPropertiesmethodfortheunderlyingobject.
Properties
DisplayComponents
DisplayHiddenLinework
Page 83
Methods
ExcludeFrom2dSectionShrinkwrap
SectionedBodyRenderingMaterialName
SectionRenderingMaterialName
SurfaceHatchPlacement
SurfaceRenderingMaterialName
SurfaceRenderMaterialMapping
MergeCommonMaterials
Events
Page 84
AecDisplayRepresentationObject
Adisplayrepresentation.
VBAobjectname: AecDisplayRepresentation
Createusing: AecDisplayRepresentation.Duplicate
Accessvia: AecDisplayRepresentations.Item
Name
Methods
AddOverride
DeleteOverride
Duplicate
Properties
AlternameName
ClassName
DefaultDisplayProperties
DisplayName
Events
Modified
Page 85
OverrideDisplayProperties
Page 86
AecDisplayRepresentationsObject
Thecollectionofdisplayrepresentations.
VBAobjectname: AecDisplayRepresentations
Createusing: N/A
Accessvia:AecDisplaySet.DisplayRepresentationsAecBaseDatabase.DisplayRepresentationsAecBaseDocument.DisplayRepresentations
Methods
Append
Has
Item
Remove
Properties
Count
Owner
Events
Page 87
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
Page 88
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
Page 89
AecEntityObject
BaseclassforallAECentities.
VBAobjectname: AecEntity
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
AlthoughAecEntitycanbeusedasagenericreferencetoanyAECobject,itisbettertouseAecGeoasagenericAECobjectreference.AecGeoisthegreatestcommondominatorforallAECobjects.
Methods
ArrayPolar
ArrayRectangular
Properties
Application
Color
Page 90
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
Page 91
AecEntityReferenceObject
Areferencetoanyentityinthedrawing,similartoablockreference.
VBAobjectname: AecEntRef
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Methods
ArrayPolar
Properties
Application
Color
Description
Page 92
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
Page 93
UseOffset
Visible
Page 94
AecGeoObject
Provideslocation,rotationandanchoringcapabilitiesforAECentities.
VBAobjectname: AecGeo
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
UseAecGeoasagenericreferencetoAECobjects.
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Properties
Application
Color
Description
Page 95
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
Page 96
GridAssemblyObject
Baseclassforgridassemblies.
VBAobjectname: AecGridAssembly
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
YoucanuseAecGridAssemblyasagenericreferencetogrids,butnopropertiesormethodsspecifictogridsarecurrentlyexposedthroughthisobject.
Methods
ArrayPolarProperties
Page 97
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
Page 98
TransformBy
Update
Page 99
LayerKeyObject
Layerkeydefinition,whichspecifiesthelayerpropertiesgeneratedfromaparticularkey.
VBAobjectname: AecLayerKey
Createusing: AecLayerKeys.Add
Accessvia: AecLayerKeys.Item
Methods
Properties
Color
Description
Index
Layer
LayerKeyStyle
Linetype
Page 100
None Linetype
LineWeight
Name
PlotStyleName
PlottableRemoveable
Page 101
LayerKeysCollectionObject
Thecollectionoflayerkeydefinitionsinalayerkeystyle.
VBAobjectname: AecLayerKeys
Createusing: N/A
Accessvia: AecLayerKeyStyle.Keys
Methods
Add
Item
Remove
Properties
Count
LayerKeyStyle
Page 102
LayerKeyStyleObject
Acollectionoflayerkeys.
VBAobjectname: AecLayerKeyStyle
Createusing: N/A
Accessvia: AecLayerKeyStyles.Item
Methods
Delete
ExpandKey
Properties
AlternateName
Application
Description
Document
Handle
Page 103
ExpandKey
GenerateLayer
GetExtensionDictionary
GetXData
SetXData
HasExtensionDictionary
Keys
Name
ObjectID
ObjectName
OverridesEnabled
OverrideSettings
OwnerID
Events
Modified
Page 104
LayerKeyStylesCollection
Thecollectionoflayerkeystylesinthespecifieddrawing.
VBAobjectname: AecLayerKeyStyles
Createusing: N/A
Accessvia: AecBaseDatabase.LayerKeyStyles
Methods
Add
Delete
GetExtensionDictionary
GetXData
Has
Properties
Application
Count
Document
Handle
HasExtensionDictionary
Events
Modified
Page 105
Item
Remove
SetXData
ObjectID
ObjectName
OwnerID
Page 106
LayerKeyOverrideSettingObject
Alayerkeystyleoverridesetting.
VBAobjectname: AecLayerOverrideSetting
Createusing: N/A
Accessvia: AecLayerOverrideSettings.Item
Methods
None
Properties
Index
LayerKeyStyle
Name
Value
Page 107
LayerKeyStyleOverrideSettingsCollection
Thecollectionofoverridesettingsinalayerkeystyle.
VBAobjectname: AecLayerOverrideSettings
Createusing: N/A
Accessvia: AecLayerKeyStyle.OverrideSettings
Methods
Item
Properties
Count
LayerKeyStyle
Page 108
LayoutCurveObject
Asingledimensionalgridwithnodesalongasinglecurve.
VBAobjectname: AecLayoutCurve
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
YoucannotcreateanewlayoutcurvethroughActiveX,andmanypropertiesofthisobjectarenotyetexposed.
Methods
Properties
Application
Color
Page 109
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
Page 110
SetXData
TransformBy
Update
StartOffset
TrueColor
Type
Value
Visible
Page 111
LayoutCurveNodeObject
Anodeinalayoutcurve.
VBAobjectname: AecLayoutCurveNode
Createusing: N/A
Accessvia: AecLayoutCurveNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutCurve
Spacing
Page 112
LayoutCurveNodesCollection
Thecollectionofnodesinalayoutcurve.
VBAobjectname: AecLayoutCurveNodes
Createusing: N/A
Accessvia: AecLayoutCurve.Nodes
Youcanaccessthemembersofthecollection,buttheycurrentlycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutCurve
Events
None
Page 113
LayoutGrid2DObject
LayoutgridentityusedtolayoutanyAECobjectwithina2Dgrid.
VBAobjectname: AecLayoutGrid2D
Createusing: AddCustomObject("AecLayoutGrid2D")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Properties
Angle
Application
BayAngle
Page 114
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
Page 115
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
Page 116
LayoutGrid2DNodeObject
Anodeina2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DNode
Createusing: N/A
Accessvia: AecLayoutGrid2DNodes.Item(Butseenotebelow.)
Thisobjectisnotcurrentlyaccessible.Youcanaccess2DnodeobjectsthroughAecLayoutGrid2DXNodeandAecLayoutGrid2DYNode,butmostoftheirpropertiesarenotexposed.
Methods
None
Properties
Index
LayoutGrid2D
Spacing
Events
None
Page 118
LayoutGrid2DNodesCollection
Thecollectionofnodesina2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DNodes
Createusing: N/A
Accessvia: N/A
Thiscollectionisnotaccessible.UseAecLayoutGrid2DXNodesandAecLayoutGrid2DYNodesinstead.
Methods
Item
Properties
Count
LayoutGrid2D
Events
None
Page 119
LayoutGrid2DXNodeObject
AnodealongtheXaxisofa2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DXNode
Createusing: N/A
Accessvia: AecLayoutGrid2DXNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutGrid2D
Spacing
Events
None
Page 120
LayoutGrid2DXNodesCollection
CollectionofnodesalongtheXaxisofa2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DXNodes
Createusing: N/A
Accessvia: AecLayoutGrid2D.XNodes
Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutGrid2D
Events
None
Page 121
LayoutGrid2DYNodeObject
AnodealongtheYaxisofa2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DYNode
Createusing: N/A
Accessvia: AecLayoutGrid2DYNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutGrid2D
Spacing
Events
None
Page 122
LayoutGrid2DYNodesCollection
CollectionofnodesalongtheYaxisofa2Dlayoutgrid.
VBAobjectname: AecLayoutGrid2DYNodes
Createusing: N/A
Accessvia: AecLayoutGrid2D.YNodes
Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutGrid2D
Events
None
Page 123
LayoutGrid3DObject
Alayoutvolumeforarrangingobjectsina3Dgrid.
VBAobjectname: AecLayoutGrid3D
Createusing: AddCustomObject("AecLayoutGrid3D")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Properties
Application
Color
Depth
Page 124
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
Page 125
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
Page 126
LayoutGrid3DNodeObject
Anodeofa3DLayoutGrid.
VBAobjectname: AecLayoutGrid3DNode
Createusing: N/A
Accessvia: AecLayoutGrid3DNodes.Item(Butseenotebelow.)
Thisobjectisnotcurrentlyaccessible.Youcanaccess3DnodeobjectsthroughAecLayoutGrid3DXNodeandAecLayoutGrid3DYNode,butmostoftheirpropertiesarenotexposed.
Methods
None
Properties
Index
LayoutGrid3D
Spacing
Events
None
Page 128
LayoutGrid3DNodesCollection
Thecollectionofnodesina3Dlayoutgrid.
VBAobjectname: AecLayoutGrid3DNodes
Createusing: N/A
Accessvia: N/A
Thiscollectionisnotaccessible.UseAecLayoutGrid3DXNodesandAecLayoutGrid3DYNodesinstead.
Methods
Item
Properties
Count
LayoutGrid3D
Events
None
Page 129
LayoutGrid3DXNodeObject
AnodealongtheXaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DXNode
Createusing: N/A
Accessvia: AecLayoutGrid3DXNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutGrid3D
Spacing
Events
None
Page 130
LayoutGrid3DXNodesCollection
CollectionofnodesalongtheXaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DXNodes
Createusing: N/A
Accessvia: AecLayoutGrid3D.XNodes
Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutGrid3D
Page 131
LayoutGrid3DYNodeObject
AnodealongtheYaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DYNode
Createusing: N/A
Accessvia: AecLayoutGrid3DYNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutGrid3D
Spacing
Events
None
Page 132
LayoutGrid3DYNodesCollection
CollectionofnodesalongtheYaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DYNodes
Createusing: N/A
Accessvia: AecLayoutGrid3D.YNodes
Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutGrid3D
Page 133
LayoutGrid3DZNodeObject
AnodealongtheZaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DZNode
Createusing: N/A
Accessvia: AecLayoutGrid3DZNodes.Item
MostnodepropertieshavenotbeenexposedthroughActiveX.
Methods
None
Properties
Index
LayoutGrid3D
Spacing
Page 134
LayoutGrid3DZNodesCollection
CollectionofnodesalongtheZaxisofalayoutvolume.
VBAobjectname: AecLayoutGrid3DZNodes
Createusing: N/A
Accessvia: AecLayoutGrid3D.ZNodes
Youcanaccessthemembersofthiscollection,buttheycontainnousefulinformation.
Methods
Item
Properties
Count
LayoutGrid3D
Page 135
LayoutNodeObject
Providescommonpropertiessharedbyalltypesoflayoutnodes.
VBAobjectname: AecLayoutNode
Createusing: N/A
Accessvia: AecLayoutNodes.Item
Methods
None
Properties
SpacingEvents
None
Page 136
LayoutNodesCollection
Collectionoflayoutnodes.
VBAobjectname: AecLayoutNodes
Createusing: N/A
Accessvia: AecLayoutCurve.Nodes
Methods
Item
Properties
Count
Page 137
LayoutToolObject
Providescommonfunctionalityforlayoutcurveandlayoutgridobjects.
VBAobjectname: AecLayoutTool
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
AecLayoutToolcanbeusedasagenericreferencetolayoutobjects.
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Properties
Application
Color
Page 138
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
Page 139
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
Page 140
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
Page 141
StyleName
TrueColor
Visible
Page 142
MaskBlockStyleObject
Definesthepropertiesofamaskblockobject.
VBAobjectname: AecMaskBlockStyle
Createusing: AecMaskBlockStyles.Add("Name")
Accessvia: AecMaskBlockStyles.Item
MostmaskblockstylepropertiesarenotyetexposedthroughActiveX.
Methods
Delete
Properties
AlternateName
Application
Description
DocumentEvents
Page 143
GetExtensionDictionary
GetXData
SetXData
Handle
HasExtensionDictionary
Name
ObjectID
ObjectNameOwnerID
Events
Modified
Page 144
MaskBlockStylesCollection
Thecollectionofmaskblockstylesinthespecifieddrawing.
VBAobjectname: AecMaskBlockStyles
Createusing: N/A
Accessvia: AecBaseDatabase.MaskBlocks
Useofthiscollectionismostlylimitedtolistingthenameanddescriptionofthestyles.
Methods
Add
Delete
GetExtensionDictionary
GetXData
Properties
Application
Count
Document
HandleEvents
Page 145
GetXData
Has
Item
Remove
SetXData
Handle
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Modified
Page 146
MassElementObject
Anobjectthathasbehaviorsbasedonitsshape.
VBAobjectname: AecMassElement
Createusing: AddCustomObject("AecMassElement")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Properties
Application
Color
Depth
Page 147
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
Page 148
Rotate
Rotate3D
ScaleEntity
SetXData
TransformBy
Update
Profile
ProfileStyle
ProfileStyleName
Radius
Rise
Rotation
Style
StyleName
Subtype
TrueColor
Type
Visible
Volume
Width
Page 149
MassElementStyleObject
Definesthepropertiesofamasselementobject.
VBAobjectname: AecMassElementStyle
Createusing: AecMassElementStyles.Add("Name")
Accessvia: AecMassElementStyles.Item
Methods
Delete
GetExtensionDictionary
Properties
AlternateName
Application
Description
Document
HandleEvents
Modified
Page 150
GetXData
SetXData
HasExtensionDictionary
Name
ObjectID
ObjectName
OwnerID
Modified
Page 151
MassElementStylesCollection
Thecollectionofmasselementstylesinthespecifieddrawing.
VBAobjectname: AecMassElementStyles
Createusing: N/A
Accessvia: AecBaseDatabase.MassElementStyles
Methods
Add
Delete
GetExtensionDictionary
GetXData
Has
Properties
Application
Count
Document
Handle
HasExtensionDictionary
Events
Modified
Page 152
Item
Remove
Rename
SetXData
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Page 153
MassGroupObject
Agroupofmasselementscombinedtoformacomplexshape.
VBAobjectname: AecMassGroup
Createusing: AecMassGroups.Add
Accessvia: AecMassGroups.Item
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Copy
Properties
Application
Color
Description
Document
Handle
HasExtensionDictionary
Page 154
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
Page 155
MassGroupsCollection
Thecollectionofmassgroupsinthespecifieddrawing.
VBAobjectname: AecMassGroups
Createusing: N/A
Accessvia: AecBaseDatabase.MassGroups
Methods
Item
Properties
Count
Database
Page 156
AecMVBlockDisplayRepDefObject
Adisplayrepresentationdefinitionforamulti-viewblockstyle.
VBAobjectname: AecMVBlockDisplayRepDef
Createusing: N/A
Accessvia: AecMVBlockDisplayRepDefs.Item
Methods
Properties
DisplayName
Index
Owner
ViewBlockDefs
Events
Page 157
AecMVBlockDisplayRepDefsCollection
Thecollectionofdisplayrepresentationdefinitionsforamulti-viewblockstyle.
VBAobjectname: AecMVBlockDisplayRepDefs
Createusing: N/A
Accessvia: AecMVBlockStyle.DisplayRepDefs
Methods
Item
Properties
Count
Owner
Events
Page 158
Multi-ViewBlockObject
Aninstanceofablockthatcanhavedifferentrepresentationsindifferentviewdirections.
VBAobjectname: AecMVBlockRef
Createusing: AddCustomObject("AecMVBlockRef")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Methods
Properties
Application
Color
Description
Page 159
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
Page 160
Update TrueColor
ViewBlocks
Visible
Page 161
Multi-ViewBlockStyleObject
Definesthepropertiesofamulti-viewblockobject.
VBAobjectname: AecMVBlockStyle
Createusing: AecMVBlockStyles.Add("Name")
Accessvia: AecMVBlockStyles.Item
Mostmulti-viewblockstylepropertiesarenotyetexposedthroughActiveX.
Methods
Properties
AlternateName
Application
Description
DisplayRepDefs
Page 162
Methods
Delete
GetExtensionDictionary
GetXData
SetXData
DisplayRepDefs
Document
Handle
HasExtensionDictionary
InterferenceBlockName
Name
ObjectID
ObjectName
OwnerID
Events
Modified
Page 163
Multi-ViewBlockStylesCollection
Thecollectionofmulti-viewblockstylesinthespecifieddrawing.
VBAobjectname: AecMVBlockStyles
Createusing: N/A
Accessvia: AecBaseDatabase.MVBlockStyles
Useofthiscollectionismostlylimitedtolistingthenameanddescriptionofthestyles.
Methods
Add
Delete
GetExtensionDictionary
GetXData
Properties
Application
Count
Document
HandleEvents
Page 164
GetXData
Has
Item
Remove
SetXData
Handle
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Modified
Page 165
AecObjectObject
ProvidescommonfunctionalityforAECdatabaseobjects.
VBAobjectname: AecObject
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
AlthoughAecObjectcanbeusedasagenericreferencetoAECobjects,itisbettertouseAecGeoasagenericreference.AecGeoisthegreatestcommondominatorforallAECobjects.
Methods
Properties
Application
Description
Page 166
Methods
Delete
GetExtensionDictionary
GetXData
SetXData
Description
Document
Handle
HasExtensionDictionary
ObjectID
ObjectName
OwnerID
Events
Modified
Page 167
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
Page 168
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
Page 170
AECPolygonStyleObject
DefinesthepropertiesofanAecPolygonobject.
VBAobjectname: AecPolygonStyle
Createusing: AecPolygonStyles.Add("Name")
Accessvia: AecPolygonStyles.Item
Methods
Delete
Properties
AlternateName
Application
Description
Document
EdgeWidthEvents
Page 171
GetExtensionDictionary
GetXData
SetXData
EdgeWidthJustify
Handle
HasExtensionDictionary
Name
ObjectID
ObjectName
OwnerID
Events
Modified
Page 172
AECPolygonStylesCollection
ThecollectionofAecPolygonstylesinthespecifieddrawing.
VBAobjectname: AecPolygonStyles
Createusing: N/A
Accessvia: AecBaseDatabase.PolygonStyles
Methods
Add
Delete
GetExtensionDictionary
GetXData
Has
Properties
Application
Count
Document
Handle
HasExtensionDictionary
Events
Modified
Page 173
Item
Remove
SetXData
ObjectID
ObjectName
OwnerID
Page 174
ProfileObject
Definesthepropertiesofaprofilestyle.
VBAobjectname: AecProfile
Createusing: NewAecProfile
Accessvia: AecProfileStyle.Profile
Methods
Add
Clear
CopyFrom
Intersect
ScaleXY
Properties
Area
Bounds
Centroid
Coordinates
Rings
Perimeter
Page 175
Subtract SelfIntersects
Valid
Page 176
ProfileStyleObject
Acustomshapedefinedbytwo-dimensionalclosedpolylines.
VBAobjectname: AecProfileStyle
Createusing: AecProfileStyles.Add("Name")
Accessvia: AecProfileStyles.Item
Note:Profilesareinsertedintodrawingsaspolylines,notasAECobjects.
Methods
Delete
Properties
AlternateName
Application
Description
Document
Handle
Page 177
GetExtensionDictionary
GetXData
SetXData
Handle
HasExtensionDictionary
Name
ObjectID
ObjectName
OwnerID
Profile
Events
Modified
Page 178
ProfileStylesCollection
Thecollectionofprofilestylesinthespecifieddrawing.
VBAobjectname: AecProfileStyles
Createusing: N/A
Accessvia: AecBaseDatabase.ProfileStyles
Methods
Add
Delete
GetExtensionDictionary
GetXData
Has
Properties
Application
Count
Document
Handle
HasExtensionDictionary
Events
Modified
Page 179
Item
Remove
SetXData
ObjectID
ObjectName
OwnerID
Page 180
AecRingObject
Aclosedloopofpolylinesegments,oftenusedasagroupinsideanAecProfileobject.
VBAobjectname: AecRing
Createusing: AecRings.Add
Accessvia: AecRings.Item
Methods
Clear
Contains
CopyFrom
FromPoints
FromPolyline
Properties
Coordinates
Index
Profile
Valid
Void
Page 181
AecRingsCollection
ThecollectionofringsinanAecProfileobject.
VBAobjectname: AecRings
Createusing: N/A
Accessvia: AecProfile.Rings
Methods
Add
Item
Remove
Properties
Count
Profile
Page 182
SliceObject
SliceofamassinggrouporanyAECobject,typicallyusedtogeneratefloorplatesandspaceboundaries.
VBAobjectname: AecSlice
Createusing: AddCustomObject("AecSlice")
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
Methods
ArrayPolar
ArrayRectangular
AttachAnchor
Properties
Application
Area
Color
Page 183
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
Page 185
AecViewBlockObject
Viewblockusedfordisplayrepresentationsbyamulti-viewblock.
VBAobjectname: AecViewBlock
Createusing: N/A
Accessvia: AecViewBlocks.Item
Methods
None
Properties
Index
MVBlockRef
Name
XOffset
YOffset
Events
None
Page 187
AecViewBlocksCollection
Acollectionofviewblocksusedfordisplayrepresentationsbyamulti-viewblock.
VBAobjectname: AecViewBlocks
Createusing: N/A
Accessvia: AecMVBlockRef.ViewBlocks
Youcannotaddnewviewblocks.
Methods
Item
Properties
Count
MVBlockRef
Page 188
AecViewBlockDefObject
Aviewblockdefinitionforamulti-viewblockdisplayrepresentationdefinition.
VBAobjectname: AecViewBlockDef
Createusing: N/A
Accessvia: AecViewBlockDefs.Item
Methods
Properties
Block
Index
Owner
ViewDirection
Events
Page 189
AecViewBlockDefsCollection
Thecollectionofviewblockdefinitionsforamulti-viewblockdisplayrepresentationdefinition.
VBAobjectname: AecViewBlockDefs
Createusing: N/A
Accessvia: AecMVBlockDisplayRepDef.ViewBlockDefs
Methods
Add
Item
Remove
Properties
Count
Owner
Events
Page 190
VolumeLayoutToolObject
Providesstandardfunctionalityforall3Dlayouttools.
VBAobjectname: AecVolumeLayoutTool
Createusing: N/A
Accessvia:
ModelSpace.ItemPaperSpace.ItemBlock.ItemSelectionSet.ItemGroup.Item
AecVolumeLayoutToolcanbeusedasagenericreferenceto3Dlayout(volume)gridobjects,butyouwouldnormallyuseAecLayoutGrid3D.
Methods
ArrayPolar
ArrayRectangularProperties
Page 191
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
Page 193
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
Page 194
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.
Page 195
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.
Page 196
I
ImportFreeFormImportsaFreeFormrepresentationfromafile.
InitInitializationfunctionwhichmustbecalledbeforetheAECdatabaseobjectcanbeaccessed
IntersectBooleanIntersectsanAecProfilewiththecurrentAecProfile.
IntersectWithGetsthepointswhereoneobjectintersectsanotherobjectinthedrawing.
ItemReturnsamemberobjectofacollection.
J
K
L
M
MirrorCreatesamirrorimagecopyofaplanarobjectaroundanaxis.
Mirror3dCreatesamirrorimageofthegivenobjectaboutaplane.
MoveMovesanobjectalongavector.
N
NodeLocationReturnsthelocationofthenodeatagivenindex.
O
ObjectIDToObjectGetstheobjectthatcorrespondstothegivenobjectID.
P
Q
R
Page 197
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
Page 198
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)
Page 199
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.
Page 200
RetValAecRingThenewlyaddedobject.
RetVal=collection.Add(AcadBlock)
collectionAecViewBlockDefsThecollectionyouareaddinganewblockto.
AcadBlockAcadBlockobject;input-onlyTheblocktoaddtothecollection.
RetValAecViewBlockDefThenewlycreatedviewblockdefinitionobject.
Page 201
AppendMethodAppendsanexistingdisplayrepresentationtothecollection.
SeeAlso|Example
Signature
object.AppendDisplayRepresentation
ObjectAecDisplayRepresentationsTheobjectorobjectsthismethodappliesto.
DisplayRepresentationAecDisplayRepresentation;input-onlyThedisplayrepresentationtoaddtothecollection.
Remarks
Thismethodappliestoadisplayrepresentationscollectioninadisplayset.
Page 202
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.
Page 203
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.
Page 204
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.
Page 205
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
Page 206
distancebetweencolumnsisanegativenumber,thecolumnsareaddedtotheleft.
AutoCADbuildstherectangulararrayalongabaselinedefinedbythecurrentsnaprotationangle.
RectangulararraywithNumberOfRows=4,NumberOfColumns=3,DistBetweenRows=a,DistBetweenColumns=b.Thebaseentityisrepresentedinblue.
NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.
Page 207
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.
Page 208
AttachEntityMethodAnchorsanAECentitytoanAutoCADorAECentity.
SeeAlso|Example
Signature
object.AttachEntityentity
objectAecAnchor,AecAnchorEntToCurve,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorLeadEntToNode,AecAnchorToRefTheobjectthismethodappliesto.
entityAecEntity;input-onlyTheAECentitytobeattachedtotheanchoredobject.
Remarks
AlthoughAecAnchorEntToGridAssemblyinheritstheAttachEntitymethodfromAecAnchor,itisdisabled.
Page 209
ClearMethodClearsAecRingsandAecProfilesofsegmentsorrings.
SeeAlso|Example
Signature
object.Clear()
objectAecRing,AecProfileTheobjecttobecleared.
Page 210
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.
Page 211
ContainsMethodTeststoseeifaringisinsideanotherring.
SeeAlso|Example
Signature
RetVal=object.Contains(Ring)
objectAecRingTheobjectthismethodappliesto.
RingAecRing;input-onlyTheAecRingtocheck.
RetValBooleanTRUE:Theringisinside.FALSE:Theringisnotinside.
Page 212
ConvertToCurrentAreaDisplayMethodConvertsanareavalueusingtheLinearUnitandAreaDisplayUnitsettings.
SeeAlso|Example
Signature
RetVal=object.ConvertToCurrentAreaDisplay(Area)
objectDatabasePreferencesTheobjectthismethodappliesto.
AreaDouble;input-onlyTheareatoconvert.
RetValDoubleTheresultingarea.
Page 213
ConvertToCurrentVolumeDisplayMethodConvertsavolumevalueusingtheLinearUnitandVolumeDisplayUnitsettings.
SeeAlso|Example
Signature
RetVal=object.ConvertToCurrentVolumeDisplay(Volume)
objectDatabasePreferencesTheobjectthismethodappliesto.
VolumeDouble;input-onlyThevolumetoconvert.
RetValDoubleTheresultingvolume.
Page 214
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.
Page 215
CopyFromMethodCopiesAecRingsandAecProfiles.
SeeAlso|Example
Signature
object.CopyFromSourceObject
objectAecProfile,AecRingTheobjectbeingcopiedto.
SourceObjectThesourceobjecttobecopied;inputonly
WhencopyingaProfile,thesourceobjectmustbeanAecProfileobject.
WhencopyingaRing,thesourceobjectmustbeanAecRingobject.
Page 216
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
Page 217
primaryobjectsarereturnedinthisarray.FormoreinformationonwhatoccuredduringtheCopyObjectsoperation,oralistofobjectsownedbyprimaryobjectsthatwerealsocopied,consulttheIDPairsarray.
Remarks
Tocopyobjectstoanotheropendrawing,settheOwnerparametertotheotherdrawing'smodelspace.
DuringtheCopyObjectsoperation,objectsthatareownedorreferencedbytheprimaryobjectsintheObjectsparameterwillalsobecopied.
NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.
Page 218
DeleteMethodDeletesthespecifiedobject.
SeeAlso|Example
Signature
object.Delete
objectTheobjecttobedeleted.
Page 219
ExpandKeyMethodCalculatesandreturnstheLayerNamethatwouldbegeneratedgiventhesupplied'Key'.
SeeAlso|Example
Signature
RetVal=object.ExpandKey(key)
objectAecLayerKeyStyleTheobjectthismethodappliesto.
keyString;input-onlyThekeytoconvert.
RetValString;LayerName
Remarks
IftheKeyisnotvalid,anemptystringisreturned.
Page 220
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.
Page 221
TRUE:Usetheoriginalcoordinatesoftheboundaryrepresentation.FALSE:TranslatetheverticesoftheboundaryrepresentationtoWCS.
ThedefaultisTRUE.
object.ExportFreeForm("FileName")
objectAecMassGroupTheobjectbeingexported.
FileNameString;input-onlyThenameofthefiletoexportthefreeformrepresentationto.
Remarks
IfnopathisspecifiedforFileName,thefileiscreatedinthecurrentdrawing'sdirectory.Ifyoudonotspecifyafileextension,noneisadded.
Page 222
FromPointsMethodMakesaringfrom2DPoints.
SeeAlso|Example
Signature
object.FromPoints(points)
objectAecRingTheobjectthismethodappliesto.
pointsVariant(n-elementarrayofdoubles);input-onlyListof2Dpoints.
Remarks
Theinputforthismethodtakesavariantarrayofdoublesrepresenting2Dpoints.
Page 223
FromPolylineMethodMakesaringfroma2DPolyline.
SeeAlso|Example
Signature
object.FromPolyline(polyline)
objectAecRingTheobjectthismethodappliesto.
polylineAcadLWPolyline;input-only2Dpolylinetocopythegraphicsfrom.
Page 224
GenerateLayerMethodGeneratethelayerrecord,givenaLayerKey.
SeeAlso|Example
Signature
RetVal=object.GenerateLayer(Key)
objectAecLayerKeyStyleTheobjectthismethodappliesto.
KeyString;input-only
RetValAcadLayerTheAcadLayerwillbecreatedifnecessary,usingthesettingsfromtheLayerStandardforName,Color,Linetype,etc.
Page 225
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
Page 226
UseanAecAnchorobjectasagenericreturnargument.(TheexamplecodeforthismethoddemonstrateshowtoaccessananchorattachedtoanyAECobject.)
Page 227
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
Page 229
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.
Page 230
Remarks
Ifanobjectdoesnothaveanextensiondictionary,thismethodwillcreateanewextensiondictionaryforthatobjectandreturnitinthereturnvalue.
YoucanqueryanobjecttoseeifithasanextensiondictionarybyusingtheHasExtensionDictionaryproperty.
Page 231
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.
Page 232
Supplyinganapplicationnamewillreturnonlythedatathatwascreatedbythespecifiedapplication.
XDataTypeVariant(arrayofshorts);output-only
XDataValueVariant(arrayofvariants);output-only
Remarks
Extendeddatacanbeusedtostoreinstance-specificdatacreatedbycustomapplications.Thisdatacanbeaddedtoanyobject.Thisdatafollowstheobject'sdefinitiondata,andismaintainedintheorderthatitwassavedintothedocument.(AutoCADmaintainsthisinformation,butdoesn'tuseit.)
Page 233
HandleToObjectMethodGetstheobjectthatcorrespondstothegivenhandle.
SeeAlso|Example
Signature
RetVal=object.HandleToObject(Handle)
ObjectAecBaseDatabase,AecDatabaseTheobjectorobjectsthismethodappliesto.
HandleString;input-onlyThehandleoftheobjecttoreturn.
RetValObjectTheobjectthatcorrespondstothegivenhandle.
Remarks
Thismethodcanonlyreturnobjectsinthecurrentdocument.
Page 234
HasMethodDeterminesifanobjectisamemberofthespecifiedcollection.
SeeAlso|Example
Signature
RetVal=object.Has("Name")
objectAecLayerKeyStyles,AecMaskBlockStyles,AecMVBlockStyles,AecPolygonStyles,AecProfileStyles,AecDisplayRepresentationsThecollectionthismethodappliesto.
NameString;input-onlyThenameoftheobjecttocheckfor.
RetValBooleanTRUE:Collectioncontainstheobject.FALSE:Collectiondoesnotcontaintheobject.
Page 235
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.
Page 236
ImportFreeFormMethodImportsafreeformrepresentationfromafile.
SeeAlso|Example
Signature
object.ImportFreeForm("FileName"[,CenterAtLocation])
objectAecMassElementTheobjectbeingimportedto.Thismustbeafreeformmasselement(Type=aecMassElementTypeFreeForm).
FileNameString;input-onlyThenameofthefiletoimportthefreeformrepresentationfrom.
CenterAtLocationBoolean;optional.Controlswhetherthetheverticesoftheimportedboundaryrepresentationaretranslatedtotheinsertionpointofthemasselement.TRUE:Translatetheboundaryrepresentationtothemasselementinsertionpoint.FALSE:Usethecoordinatessavedwiththeexportedboundaryrepresentation.
ThedefaultisFALSE.
Page 237
Remarks
IfnopathisspecifiedforFileName,thecurrentdrawing'sdirectoryissearched.
Page 238
InitMethodInitializationfunctionwhichmustbecalledbeforetheAECdatabaseobjectcanbeaccessed
SeeAlso|Example
Signature
object.Init(AcadDatabaseObject)
objectAecBaseDatabase,AecBaseDatabasePreferencesTheobjectthismethodappliesto.
AcadDatabaseObjectAcadDatabase;input-onlyThedatabase.
Page 239
IntersectMethodBooleanIntersectsanAecProfilewiththecurrentAecProfile.
SeeAlso|Example
Signature
object.Intersect(Profile)
objectAecProfileTheobjectthismethodappliesto.
ProfileAecProfile;input-onlyTheprofiletointersectwiththecurrentprofile.
Page 240
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.
Page 241
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
Page 242
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
Page 243
Thismethodsupportscase-sensitivestringbasediteration.Forexample,youcouldreferencetheMulti-ViewBlockdefinitionnamed"Fixture1"throughthefollowingstatement:
SetmvBlock=cMvBlocks.Item("Fixture1")
Page 244
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
Page 245
Thetwopointsspecifiedasparametersbecometheendpointsofalinearoundwhichthebaseobjectisreflected.
Selectedobject
Point1andPoint2specifyingthemirroraxis
Mirroredobject
Thismethodplacesthereflectedimageintothedrawingandretainstheoriginalobject.Toremovetheoriginalobject,usetheDeletemethod.
YoucanmirroraViewportobjectinpaperspace,althoughdoingsohasnoaffectonitsmodelspacevieworonmodelspaceobjects.
AutoCADcheckstoseeiftheobjecttobecopiedownsanyotherobject.Ifitdoes,itperformsacopyonthoseobjectsaswell.Theprocesscontinuesuntilallownedobjectshavebeencopied.
NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.
Page 246
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
Page 247
Thisobjectcanbeanydrawingentityobject.
Remarks
Objectmirroredaboutaplanedefinedbythreepoints
AutoCADcheckstoseeiftheobjecttobecopiedownsanyotherobject.Ifitdoes,itperformsacopyonthoseobjectsaswell.Theprocesscontinuesuntilallownedobjectshavebeencopied.
NOTEYoucannotexecutethismethodwhilesimultaneouslyiteratingthroughacollection.Aniterationwillopentheworkspaceforaread-onlyoperation,whilethismethodattemptstoperformaread-writeoperation.Completeanyiterationbeforeyoucallthismethod.
Page 248
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.
Page 249
Givenobjectwithtwopointsindicated Movedobject
Page 250
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.
Page 251
ObjectIDToObjectMethodGetstheobjectthatcorrespondstothegivenobjectID.
SeeAlso|Example
Signature
RetVal=object.ObjectIDToObject(ID)
ObjectAecBaseDatabase,AecDatabaseTheobjectorobjectsthismethodappliesto.
IDLong;input-onlyTheobjectIDoftheobjecttoreturn.
RetValObjectTheobjectthatcorrespondstothegivenobjectID.
Remarks
Thismethodcanonlyreturnobjectsinthecurrentdocument.
Page 252
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.
Page 253
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,
Page 254
AecProfileStyles,AecDisplayRepresentations,AecViewBlockDefsThecollectionthismethodappliesto.
NameString;input-onlyThenameoftheitemtoberemoved.
object.Remove(Index)
objectAecLayerKeys,AecRingsThecollectionthismethodappliesto.
IndexLong;input-onlyTheindexnumbervalueoftheitemtoremovefromthecollection.
object.Remove(AcadBlock)
objectAecViewBlockDefsThecollectionyouareremovingablockfrom.
AcadBlockAcadBlockobject;input-onlyTheblocktoremovefromthecollection.
Page 255
RenameMethodRenamesaniteminanAecDictionary.
SeeAlso|Example
Signature
RetVal=object.Rename(OrigName,NewName)
ObjectAecDictionary,AecLayerKeyStyles,AecMaskBlockStyles,AecMassElementStyles,AecMVBlockStyles,AecPolygonStyles,AecProfileStylesTheobjectthismethodappliesto.
OrigNameString;input-onlyTheoriginalnameoftheitem.
NewNameString;input-onlyThenewnameoftheitem.
Remarks
Objectswillmaintaintheirreferencetoastyleevenifithasbeenrenamed.
Page 256
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
Page 257
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.
Page 259
SaveAsDefaultMethodSavestheDatabasePreferencestotheregistry.
SeeAlso|Example
Signature
object.SaveAsDefault()
objectAecBaseDatabasePreferencesTheobjectthismethodappliesto.
Page 260
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
Page 261
BasePoint
ScaleFactor=0.5andScaleFactor=2
Page 262
ScaleXYMethodScalesaprofileintheXandYdirections.
SeeAlso|Example
Signature
object.ScaleXY(X,Y)
objectAecProfileTheobjectthismethodappliesto.
XDouble;input-onlyTheXfactortoscaleby.
YDouble;input-onlyTheYfactortoscaleby.
Page 263
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
Page 264
See ExtendedDataintheDXFReferencefortheextendeddatagroupcodestospecifyforthisargument.
XDataArrayofVariant;input-only
Remarks
Extendeddatacanbeusedforstoringinstance-specificdatacreatedbycustomapplications.Thisdatacanbeaddedtoanyentity.Thisdatafollowstheentity'sdefinitiondataandismaintainedintheorderinwhichitwassavedintothedocument.(AutoCADmaintainsthisinformationbutdoesn'tuseit.)
Page 265
SubtractMethodSubtractsanAecProfilefromthecurrentAecProfile.
SeeAlso|Example
Signature
object.Subtract(Profile)
objectAecProfileTheobjectthismethodappliesto.
ProfileAecProfile;input-onlyTheprofiletosubtract.
Page 266
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
Page 267
0 0 0 1
Thismethodwillreturnanerrorifthetransformationmatrixisnotcorrect.
Sampletransformationmatricesareprovidedintheexamplecodeforthismethod.
Page 268
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.
Page 269
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.
Page 270
ApplicationGetstheApplicationobject.
ApplyResizeSpecifiesiftheanchoredobjectisresizedwhenthelayoutcellisresized.
AreaGetstheareaofanobject.
AreaDisplayUnitTheunitusedwhenareameasurementsaredisplayed.
AreaPrecisionTheprecisiontowhichareameasurementsaredisplayed.
AreaSuffixThesuffixdisplayedafteranareaunitinthedrawing.
B
BasePointGetsandsetsthebasepointforthedrawingasanXYZ.
BasePointNEGetsandsetsthebasepointforthedrawingasanENZ.
BayAngleSpecifiesthebayangleofthelayoutgrid.
BlockBasedLayerOffBehaviorImmediateandindependentlayeron/offcontrolofdisplaycomponents.
BlocksGetstheBlockscollectionforthedrawing.
BottomOffsetSpecifiesthebottomoffsetoftheanchoredobjecttothegriditisattachedto.
BoundarySpecifiestheboundaryobjectattachedtothegrid.
BoundsGetstheupperleftandlowerrightcornersoftheprofile.
C
CellSpecifiesthegridcelltoanchortheentityto.
CenterOnNodeSpecifiesiftheanchoredobjectiscenteredonthelayoutnode.
CentroidGetsthecenterofareaormassforaprofileshape.
Page 271
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.
Page 272
ElevationModelSpaceSpecifiestheelevationsettinginthemodelspace.
ElevationPaperSpaceSpecifiestheelevationsettinginthepaperspace.
ElevationPrecisionSpecifiestheprecisiontowhichelevationmeasurementsaredisplayedinthedrawing.
EndOffsetSpecifiestheoffsetdistancefromtheendpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.
F
FacetDeviationSpecifiesthealloweddeviationwhenfacettingcurvedlinesandsurfaces.
FacetMaximumSpecifiesthemaximumnumberoffacetsusedforacircle.
FlipXDeterminesiftheanchoredobjectisflippedabouttheXaxisofthecurveitisanchoredto.
FlipYDeterminesiftheanchoredobjectisflippedabouttheYaxisofthecurveitisanchoredto.
FlipZDeterminesiftheanchoredobjectisflippedabouttheZaxisofthecurveitisanchoredto.
G
GroupsGetstheGroupscollectionforthedocument.
H
HandleGetsthehandleofanobject.
HasExtensionDictionaryDeterminesiftheobjecthasanextensiondictionaryassociatedwithit.
HeightSpecifiestheheightoftheobject.
HyperlinksGetstheHyperlinkscollectionforanentity.
Page 273
I
IndexReturnsthepositionoftheitemwithinitscollection.
InsertionPointSpecifiestheinsertionpointoftheprofile.
InsideRadiusSpecifiestheinsideradiusofthelayoutgrid.
J
K
KeysReturnsthecollectionoflayerkeysinalayerkeystyle.
L
LayerSpecifiesthelayertheobjectison.
LayerFileSpecifiesthenameofthefilecontainingdefaultlayerstandardandkeystyledefinitions.
LayerKeyStyleSpecifiesthelayerkeystylefortheobject.
LayerKeyStylesReturnsthecollectionoflayerkeystylesinthecurrentdrawing.
LayersGetstheLayerscollectionforthedocument.
LayerStandardThelayerstandardtoapplytothedrawing.
LayoutCurveProvidesaccesstolayoutcurvegeometry.
LayoutGrid2DIdentifiesthe2Dlayoutgridthatownstheobject.
LayoutGrid3DIdentifiesthe3Dlayoutgridthatownstheobject.
LayoutsGetstheLayoutscollectionforthedocument.
LeaderExtension1Specifiesthefirstleaderextension.
LeaderExtension2Specifiesthesecondleaderextension.
Page 274
LeftOffsetSpecifiestheleftoffsetfortheanchoredobject.
LimitsSpecifiesthedrawinglimits.
LinearDisplayFormatSpecifiestheformatusedtodisplaylinearmeasurementvalues.
LinearPrecisionSpecifiesthelinearprecisionforthedrawing.
LinearUnitSpecifiestheunitusedtodisplaylinearvalues.
LineTypeSpecifiesthelinetypeoftheobject.
LinetypesGetstheLinetypescollectionforthedocument.
LinetypeScaleSpecifiesthelinetypescaleofanentity.
LineWeightSpecifiesthelineweightoftheobject.
LineweightDisplaySpecifieswhetherlineweightsaredisplayedinmodelspaceforthedrawing.
LocationSpecifiestheinsertionpositionoftheobject.
LowerExtensionSpecifiesthedistanceofthelowercutplanebelowtheclipvolumeposition.
M
MaskBlockStylesReturnsthecollectionofmaskblockstylesinthespecifieddrawingdocumentordatabase.
MassElementStylesReturnsthecollectionofmasselementstylesinthespecifieddrawingdatabase.
MassGroupGetsorsetstheparentmassgroupofamasselementormassgroup.
MassGroupNameSpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.
Page 275
MassGroupsReturnsthecollectionofmassgroupsinadocumentordatabase.
MaxActiveViewportsSpecifiesthemaximumnumberofactiveviewports.
MeasurementUnitIdentifiesthesystemofunitsusedtodisplaymeasurementsinthedrawing.
ModelSpaceGetstheModelSpacecollectionforthedocument.
MVBlockRefGetsorsetsamulti-viewblockreferenceforaviewblockorcollectionofviewblocks.
MVBlockStylesReturnsthecollectionofmulti-viewblockstylesinthespecifieddocumentordatabase.
N
NameReturnsthenameoftheobject.
NodeSpecifiesthelayoutnodetheanchorattachesanobjectto.
NodesReturnsthecollectionofnodesonthelayoutcurve.
NormalSpecifiesthenormalvectoroftheAECobject.
NorthRotationSpecifiestheanglealignedtonorthwithinadrawing.
O
ObjectIDGetstheobjectIDoftheobject.
ObjectNameGetstheAutoCADclassnameoftheobject.
ObjectSortByPlottingTogglessortingofdrawingobjectsbyplottingorder.
ObjectSortByPSOutputTogglessortingofdrawingobjectsbyPostScriptoutputorder.
ObjectSortByRedrawsTogglessortingofdrawingobjectsbyredraworder.
Page 276
ObjectSortByRegensTogglessortingofdrawingobjectsbyregenerationorder.
ObjectSortBySelectionTogglessortingofdrawingobjectsbyobjectselection.
ObjectSortBySnapTogglessortingofdrawingobjectsbyobjectsnap.
OffsetSpecifiestheoffsetfromthelayoutnode.
OLELaunchDetermineswhethertolaunchtheparentapplicationwhenplottingOLEobjects.
OperationSpecifieshowobjectsarecombined.
OverridesEnabledSpecifieswhetherlayeroverridesareappliedtothestylewhenalayerisgeneratedfromakey.
OverrideSettingsReturnsthecollectionoflayerkeyoverridesettingsforalayerkeystyle.
OwnerIDGetstheobjectIDoftheowner(parent)object.
P
PaperSpaceGetsthePaperSpacecollectionforthedocument.
PlotConfigurationsGetsthePlotConfigurationscollectionforthedocument.
PlotStyleNameSpecifiestheplotstylenamefortheobject.
PlottableSpecifieswhetherthelayergeneratedfromthekeyisplottable.
PolygonStylesReturnsthecollectionofpolygonstylesinthespecifieddrawingdatabase.
PreferencesReturnsthePreferencesobjectforthespecifieddrawing.
ProfileReturnsorsetstheobject'sprofile.
Page 277
ProfileStyleSpecifiestheprofilestyleofthemasselement.
ProfileStyleNameSpecifiesthenameofthemasselement'sprofilestyle.
ProfileStylesReturnsthecollectionofprofilesinthespecifieddrawingdatabase.
ProjectNameSpecifiesthenameoftheprojectthatthedrawingbelongsto.
Q
R
RadiusSpecifiestheradiusofcurvedmasselements.
ReferenceSpecifiestheobjectbeinganchoredto.
RegisteredApplicationsGetstheRegisteredApplicationscollectionforthedocument.
RemoveableSpecifieswhetheryoucanremovethelayerkeyfromthelayerkeystyle.
RenderSmoothnessSpecifiesthesmoothnessofshaded,rendered,andhiddenline-removedobjects.
ResizeOffsetSpecifiestheoffsetoftheanchoredobjecttothecellboundarywhenthecellisresized.
RightOffsetSpecifiestherightoffsetfortheanchoredobject.
RingsReturnsthecollectionofringsthatmakeuptheprofile.
RiseSpecifiestheriseofgabledmasselements.
RotationSpecifiestherotationreferenceanglefortheobject.
S
ScaleOnInsertSpecifieswhetherobjectsareautomaticallyscaledwhen
Page 278
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.
Page 279
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.
Page 280
VolumeReturnsthevolumeofthemasselementormassgroup.
VolumeDisplayUnitSpecifiestheunitsusedtodisplayvolumemeasurements.
VolumePrecisionSpecifiesthenumberofdecimalplacesdisplayedforvolumemeasurements.
VolumeSuffixThesuffixstringaddedwhenvolumemeasurementsaredisplayedinthedrawing.
W
WidthSpecifiesthewidthoftheobject.
WindowStateSpecifiesthestateoftheapplicationordocumentwindow.
WindowTitleGetsthetitleofthedocumentwindow.
X
XCountSpecifiesthenumberofnodesalongtheXdirection.
XDistanceSpecifiesthedistancealongthecurve'sXaxistotheanchoredobject.
XEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheXdirectiongridcurve,whichmaybeusedtoreducethegridsize.
XNodesReturnsthecollectionofnodesalongtheXdirectionofthelayoutgrid.
XOffsetSpecifiestheoffsetintheXdirectionoftheviewblockwithinthemulti-viewblock.
XPositionFromSpecifiesthepositiononthecurvefromwhichtheXDistancetoananchoredobjectismeasured.
XPositionToSpecifiesthepositionontheanchoredobjecttomeasureXDistanceto.
Page 281
XRefEditDeterminesifthecurrentdrawingcanbeeditedinplacewhenbeingreferencedbyanotheruser.
XRefLayerVisibilityDeterminesthevisibilityofxref-dependentlayersandspecifiesifnestedxrefpathchangesaresaved.
XrefOverlaysUseOwnDisplayConfigWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.
XRotationSpecifiestherotationoftheanchoredobjectaroundtheXaxis.
XSpacingSpecifiesthespacingbetweennodesalongtheXdirectionofthelayoutgrid.
XStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheXdirectiongridcurve,whichmaybeusedtoreducethegridsize.
XTypeSpecifiestherulecontrollingnodespacingalongtheXdirection.
Y
YAlignmentSpecifiesthealignmentoftheanchoredobjectinrelationtothebaselineoftheassembly.
YCountSpecifiesthenumberofnodesalongtheydirection.
YDistanceSpecifiesthedistancealongthecurve'sYaxistotheanchoredobject.
YEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheYdirectiongridcurve,whichmaybeusedtoreducethegridsize.
YNodesReturnsthecollectionofnodesalongtheYdirectionofthelayoutgrid.
YOffsetSpecifiestheYoffsetoftheanchoredobject,ortheoffsetintheYdirectionoftheviewblockwithinthemulti-viewblock.
YPositionFromSpecifiesthepositiononthecurvefromwhichtheYDistancetoananchoredobjectismeasured.
Page 282
YPositionToSpecifiesthepositionontheanchoredobjecttomeasureYDistanceto.
YRotationSpecifiestherotationoftheanchoredobjectaroundthelayoutnode'sYaxis.
YSpacingSpecifiesthespacingbetweennodesalongtheYdirectionofthelayoutgrid.
YStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheYdirectiongridcurve,whichmaybeusedtoreducethegridsize.
YTypeSpecifiestherulecontrollingnodespacingalongtheYdirection.
Z
ZCountSpecifiesthenumberofnodesalongtheZdirection.
ZDistanceSpecifiesthedistanceabovethecurvetotheanchoredobject.
ZEndOffsetSpecifiestheoffsetdistancefromtheendpointalongtheZdirectiongridcurve,whichmaybeusedtoreducethegridsize.
ZNodesReturnsthecollectionofnodesalongtheZdirectionofthe3Dlayoutgrid.
ZOffsetSpecifiestheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.
ZoomSpecifiesthefocallengthofthecamera,inmillimeters.
ZPositionFromSpecifiesthepositiononthecurvefromwhichtheZDistancetoananchoredobjectismeasured.
ZPositionToSpecifiesthepositionontheanchoredobjecttomeasureZDistanceto.
ZRotationSpecifiestherotationoftheanchoredobjectaroundtheZaxis.
ZSpacingSpecifiesthespacingbetweennodesalongtheZdirectionofthelayoutgrid.
Page 283
ZStartOffsetSpecifiestheoffsetdistancefromthestartpointalongtheZdirectiongridcurve,whichmaybeusedtoreducethegridsize.
ZTypeSpecifiestherulecontrollingnodespacingalongtheZdirection.
Page 284
ActiveSetPropertyReturnstheactivedisplaysetforthespecifiedviewport.
SeeAlso|Example
Signature
RetVal=object.ActiveSet(ViewPort)
objectAecDisplaySetsTheobjectthispropertyappliesto.
ViewPortAcadObject;input-onlyTheAcadViewportorAcadPViewportthatthedisplayconfigurationappliesto.
RetValAecDisplaySetTheactivedisplaysetforthespecifiedviewport.
Page 285
AdjustSizingPropertySpecifieswhetheryoucanoverridethedefaultoffsetvaluesoftheanchoredobject,thuschangingitssize.
SeeAlso|Example
Signature
object.AdjustSizing
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
AdjustSizingBoolean;read-writeTRUE:Offsetscanbemodified.FALSE:Offsetscannotbemodified.
Page 286
AllowByMaterialPropertyDeterminesiftheByMaterialpropertyshouldbeapplied.
SeeAlso|Example
Signature
object.AllowByMaterial
objectAecDisplayComponentEntityTheobjectthispropertyappliesto.
AllowByMaterialBoolean;read-write
Remarks
Thisisanadvancedsettingthatshouldrarelyneedtobechanged.
Page 287
AllowVariationPropertySpecifiesiftheanchoredobjectisallowedtovary.
SeeAlso|Example
Signature
object.AllowVariation
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
AllowVariationBoolean;read-writeTRUE:Allowvariation.FALSE:Don'tallowvariation.
Page 288
AlternateNamePropertyTheAlternateNameoftheStyle.
SeeAlso|Example
Signature
object.AlternateName
objectAecMaskBlockStyle,AecLayerKeyStyle,AecDictRecord,AecMVBlockStyle,AecPolygonStyle,AecProfileStyleTheobjectthispropertyappliesto.
AlternateNameString;read-writeTheAlternateNameoftheStyle.
Page 289
AlwaysImportLayerStandardPropertySpecifieswhethertoalwaysimportanewerlayerstandard.
SeeAlso|Example
Signature
object.AlwaysImportLayerStandard
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AlwaysImportLayerStandardBoolean;read-writeSpecifieswhethertoalwaysimportanewerlayerstandard.
Page 290
AnglePropertySpecifiestheangleofthelayoutgrid,ortheangleofthehatchpatternforadisplaycomponent.
SeeAlso|Example
Signature
object.Angle
objectAecDisplayComponentHatch,AecLayoutGrid2DTheobjectthispropertyappliesto.
AngleACAD_ANGLE;read-writeTheangleofthelayoutgrid,ortheangleofthehatchpatternforadisplaycomponent.
Page 291
Angle1PropertyDeviationofcutplaneatstartingedgewherezeroisperpendiculartotheclipline.
SeeAlso|Example
Signature
object.Angle1
objectAecClipVolTheobjectthispropertyappliesto.
Angle1Double(radians);read-write
Remarks
Theangleisspecifiedinradians.
Page 292
Angle2PropertyDeviationofcutplaneatendingedgewherezeroisperpendiculartotheclipLine.
SeeAlso|Example
Signature
object.Angle2
objectAecClipVolTheobjectthispropertyappliesto.
Angle2Double(radians);read-write
Remarks
Theangleisspecifiedinradians.
Page 293
AngleFromNodePropertySpecifiestheanglefromtheanchoredentitytothenode.
SeeAlso|Example
Signature
object.AngleFromNode
objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
AngleFromNodeDouble;read-writeTheangle,inradians,fromtheanchoredentitytothenode.
Page 294
AngularAzimuthProperty
Theformatusedtodisplayangles.
SeeAlso|Example
Signature
object.AngularAzimuth
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AngularAzimuthLong;read-write
0: UseBearings
1: UseNorthAzimuths
2: UseSouthAzimuths
Page 295
AngularDisplayFormatProperty
Specifiestheunitusedwhenangularmeasurementsaredisplayed.
SeeAlso|Example
Signature
object.AngularDisplayFormat
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AngularDisplayFormatLong;read-write
0: UseDegrees
1: UseDegrees/Minutes/Seconds
2: UseGrads
3: UseRadians
4: UseSurveyor
Remarks
Page 296
WhenyoutypedegreesatAutoCADcommandprompts,typetheminthedecimalformatindicated(DD.MMSS).Useaperiod(.)betweenthedegreevalueandtheminutesandseconds.Forexample,toenter67°45’15"typethevalueas67.4515.Ifyouusebearings,thentypethebearingquadrantfirst,andthentheangleindegrees.
Page 297
AngularPrecisionPropertySpecifiestheangularprecisionforthedrawing.
SeeAlso|Example
Signature
object.AngularPrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AngularPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.
Remarks
Thisisusedtodisplayminutesandseconds.
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.AutoCADcommandsalwayscalculateallnumbersuptothehighestinternalprecision.
Page 298
ApplicationPropertyGetstheApplicationobject.
SeeAlso|Example
Signature
object.Application
objectAllobjects.Theobjectorobjectsthispropertyappliesto.
ApplicationApplicationobject;read-only
Remarks
TheApplicationobjectrepresentstheapplication'sframecontrolsandpathsettings,andprovidesthemeanstonavigatedowntheobjecthierarchy.
Page 299
ApplyResizePropertySpecifiesiftheanchoredobjectisresizedwhenthelayoutcellisresized.
SeeAlso|Example
Signature
object.ApplyResize
objectAecAnchorEntToLayoutVolume,AecAnchorToLayoutCellTheobjectthispropertyappliesto.
ApplyResizeBoolean;read-writeTRUE:Applyresize.FALSE:Don'tapplyresize.
Remarks
IfyouwanttosettheResizeOffsetproperty,youmustfirstsetApplyResizetoTrueinorderforthespecifiedoffsettotakeaffect.
Page 300
AreaPropertyGetstheareaofanobject.
SeeAlso|Example
Signature
object.Area
objectAecProfile,AecSliceTheobjectthispropertyappliesto.
AreaDouble;read-onlyTheareaenclosedbytheobject.
Page 301
AreaDisplayUnitPropertyTheunitusedwhenareameasurementsaredisplayed.
SeeAlso|Example
Signature
object.AreaDisplayUnit
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AreaDisplayUnitAecBuiltInUnitenum;read-write
Page 302
AreaPrecisionPropertyTheprecisiontowhichareameasurementsaredisplayed.
SeeAlso|Example
Signature
object.AreaPrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AreaPrecisionLong;read-writeThedisplayprecisionusedforareas.
Remarks
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.
Page 303
AreaSuffixPropertyThesuffixdisplayedafteranareaunitinthedrawing.
SeeAlso|Example
Signature
object.AreaSuffix
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
AreaSuffixString;read-writeThesuffixdisplayedfollowingtheareaunit.
Remarks
Thedefaultvalueis"Sq.Ft."or"m2",dependingonthevalueoftheMeasurementUnitproperty.Thevaluemustbenolongerthan255charactersinlength.
Page 304
BasePointPropertyGetsandsetsthebasepointforthedrawingasanXYZ.
SeeAlso|Example
Signature
object.BasePoint
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
BasePointVariant(3elementarrayofdoubles);read-writeThebasepointinWCSX,Y,Z.
Remarks
SetthisvaluetoindicatetheWCSX,Y,ZthatcorrespondstothevalueoftheBasePointNEproperty.InthedefaultcoordinatesystemX,Yis0,0andtheNorthing/Eastingis0,0.
Page 305
BasePointNEPropertyGetsandsetsthebasepointforthedrawingasanENZ.
SeeAlso|Example
Signature
object.BasePointNE
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
BasePointNEVariant(3elementarrayofdoubles);read-writeThebasepointinWCSX,Y,Z.
Remarks
SetthisvaluetoindicatetheEasting,NorthingandelevationthatcorrespondstothevalueoftheBasePointproperty.Inthedefaultcoordinatesystem,X,Yis0,0andtheNorthing/Eastingis0,0.
Page 306
BayAnglePropertySpecifiesthebayangleofthelayoutgrid.
SeeAlso|Example
Signature
object.BayAngle
objectAecLayoutGrid2DTheobjectthispropertyappliesto.
BayAngleACAD_ANGLE;read-writeThebayangleofthelayoutgrid.
Page 307
BlockPropertyGetsorsetstheAcadBlockfortheview.
SeeAlso|Example
Signature
object.Block
objectAecViewBlockDefTheobjectthispropertyappliesto.
BlockAcadBlock;read-write
Page 308
BlockBasedLayerOffBehaviorPropertyImmediateandindependentlayeron/offcontrolofdisplaycomponents.
SeeAlso|Example
Signature
object.BlockBasedLayerOffBehavior
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
BlockBasedLayerOffBehaviorBoolean;read-writeImmediateandindependentlayeron/offcontrolofdisplaycomponents.
Page 309
BlocksPropertyGetstheBlockscollectionforthedrawing.
SeeAlso|Example
Signature
object.Blocks
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
BlocksBlockscollection;read-onlyTheBlockscollectionforthedrawing.
Page 310
BottomOffsetPropertySpecifiesthebottomoffsetoftheanchoredobject.
SeeAlso|Example
Signature
object.BottomOffset
objectAecAnchorEntToGridAssemblyTheanchorobjectthispropertyappliesto.
BottomOffsetDouble;read-writeThebottomoffsetoftheanchoredobject.(SeeRemarks.)
Remarks
TochangetheBottomOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingBottomOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Page 311
BoundaryPropertySpecifiestheboundaryobjectattachedtothegrid.
SeeAlso|Example
Signature
object.Boundary
objectAecLayoutGrid2DTheobjectthispropertyappliesto.
BoundaryAcadEntity;read-writeTheboundaryobjectattachedtothegrid.
Page 312
BoundsPropertyGetstheupperleftandlowerrightcornersoftheprofile.
SeeAlso|Example
Signature
object.Bounds
objectAecProfileTheobjectthispropertyappliesto.
BoundsVariant(arrayof4doubles);read-onlyTopleft/Bottomrightcornerofprofile.
Page 313
ByMaterialPropertySpecifiesifthedisplaypropertiesaredeterminedbythematerialassignedtothedisplaycomponent.
SeeAlso|Example
Signature
object.ByMaterial
objectAecDisplayComponentEntityTheobjectthispropertyappliesto.
ByMaterialBoolean;read-write
Page 314
CellPropertySpecifiesthegridcelltoanchortheentityto.
SeeAlso|Example
Signature
object.Cell
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
CellLong;read-writeTheindexofthegridcelltheobjectisanchoredto.
Page 315
CenterOnNodePropertySpecifiesiftheanchoredobjectiscenteredonthelayoutnode.
SeeAlso|Example
Signature
object.CenterOnNode
objectAecAnchorEntToLayoutVolume,AecAnchorLeadEntToNode,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutCellTheobjectthispropertyappliesto.
CenterOnNodeBoolean;read-writeTRUE:Centeronnode.FALSE:Don'tcenteronnode.
Page 316
CentroidPropertyGetsthecenterofareaormassforaprofileshape.
SeeAlso|Example
Signature
object.Centroid
objectAecProfileTheobjectthispropertyappliesto.
CentroidVariant(two-elementarrayofdoubles);read-onlyCentroidpointoftheprofile.
Page 317
ClassNamePropertyTheclassnameoftheobject.
SeeAlso|Example
Signature
object.ClassName
objectAecDisplayRepresentationTheobjectthispropertyappliesto.
ClassNameString;read-write
Page 318
ClipVolPropertySpecifiestheclipvolumeofthe2dsection.
SeeAlso|Example
Signature
object.ClipVol
objectAec2dSectionTheobjectthispropertyappliesto.
ClipVolAecClipVol;read-write
Page 319
ContourLinesPerSurfaceProperty
Specifiesthenumberofcontourlines(isolines)persurfaceonobjects.
SeeAlso|Example
Signature
object.ContourLinesPerSurface
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ContourLinesPerSurfaceInteger;read-writeThevalidrangeis0to2047.
Systemvariables
ThevalueofthispropertyisstoredintheISOLINESsystemvariable.
Remarks
Theinitialvalueforthispropertyis4.
AtoruswithContourLinesPerSurfacesetto4
AtoruswithContourLinesPerSurfacesetto20
Page 320
CoordinatePrecisionPropertySpecifiestheprecisiontowhichcoordinatemeasurementsaredisplayed.
SeeAlso|Example
Signature
object.CoordinatePrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
CoordinatePrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.
Remarks
ThisisusedtodisplayallNorthing/Eastingcoordinateinformation.
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.
Page 321
CoordinatesPropertyReturnstheverticesofaringorprofile.
SeeAlso|Example
Signature
object.Coordinates
objectAecRing,AecProfileTheobjectthispropertyappliesto.
CoordinatesVariant(n-elementarrayofdoubles);read-onlyListof2Dpoints.Theverticesofthisringorprofile.
Page 322
CountPropertyGetsthenumberofitemsinacollection,orthenumberofnodesinalayoutcurve.
SeeAlso|Example
Signature
object.Count
objectAllCollections,AecLayoutCurve,AecDisplayRepresentations,AecDisplayComponents,AecMVBlockDisplayRepDefs,AecViewBlockDefs,AecsConnectionNodesTheobjectthispropertyappliesto.
CountLong;read-onlyThenumberofitems.
Page 323
CreateDimscaleOverridePropertyAutomaticallycreateadimscaleoverride.
SeeAlso|Example
Signature
object.CreateDimscaleOverride
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
CreateDimscaleOverrideBoolean;read-writeAutomaticallycreateadimscaleoverride.
Page 324
CutPlaneDisplayAbovePropertyGetsorsetstheupperrangeabovethecutplanetodisplayobjects.
SeeAlso|Example
Signature
object.CutPlaneDisplayAbove
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
CutPlaneDisplayAboveDouble;read-write
Page 325
CutPlaneDisplayBelowPropertyGetsorsetsthelowerrangebelowthecutplanetodisplayobjects.
SeeAlso|Example
Signature
object.CutPlaneDisplayBelow
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
CutPlaneDisplayBelowDouble;read-write
Page 326
CutPlaneHeightPropertyGetsorsetstheheightofthecutplane.
SeeAlso|Example
Signature
object.CutPlaneHeight
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
CutPlaneHeightDouble;read-write
Page 327
CutProfilePropertyReturnsthecutprofilefortheobject.
SeeAlso|Example
Signature
object.CutProfile
objectAecMaskBlockRefTheobjectthispropertyappliesto.
CutProfileAecProfile;read-only
Page 328
DatabasePropertyGetsthedatabaseinwhichtheobjectbelongs.
SeeAlso|Example
Signature
object.Database
objectAecBaseDatabasePreferences,AecMassGroupsTheobjectorobjectsthispropertyappliesto.
DatabaseAcadDatabaseobject;read-onlyTheDatabaseobjectthatcontainstheobject.
Page 329
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.
Page 330
DepthPropertyGetsorsetsthesizeofthegridormasselementinitsrelativeYdirection.
SeeAlso|Example
Signature
object.Depth
objectAecLayoutGrid2D,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.
DepthDouble;read-writeThesizeoftheobjectinitsrelativeYdirection;seeRemarks.
Remarks
Forradial2Dlayoutgrids,Depthisanangle,inradians.
Page 331
DefaultDisplayPropertiesPropertyThecollectionofdefaultdisplaypropertiesforthedisplayrepresentation.
SeeAlso|Example
Signature
object.DefaultDisplayProperties
objectAecDisplayRepresentationTheobjectthispropertyappliesto.
DefaultDisplayPropertiesAecDisplayProperties;read-write
Page 332
DescriptionPropertyGetsorsetstextdescribingtheAECObject.
SeeAlso|Example
Signature
object.Description
objectAecAnchorExtendedTagToEntAecObjectTheobjectthispropertyappliesto.
DescriptionString;read-writeDescriptionoftheAECObject.
Page 333
DeviationPropertySpecifiesthedeviationofthemasselement.
SeeAlso|Example
Signature
object.Deviation
objectAecMassElementTheobjectthispropertyappliesto.
DeviationDouble;read-write
Page 334
DictionariesPropertyGetstheDictionariescollectionforthedocument.
SeeAlso|Example
Signature
object.Dictionaries
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
DictionariesDictionariescollection;read-onlyTheDictionariescollectionforthedocument.
Page 335
DimStylesPropertyGetstheDimStylescollectionforthedocument.
SeeAlso|Example
Signature
object.DimStyles
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
DimStylesAcadDimStylescollection;read-onlyTheDimStylescollectionforthedocument.
Page 336
DisplayComponentsPropertyGetsthecollectionofdisplaycomponentsforthedisplayrepresentation.
SeeAlso|Example
Signature
object.DisplayComponents
objectAecDisplayPropertiesTheobjectthispropertyappliesto.
DisplayComponentsAecDisplayComponents;read-write
Remarks
ThedisplaycomponentscollectioncontainsAecDisplayComponentEntityandAecDisplayComponentHatchobjects.
Page 337
DisplayConfigurationsPropertyReturnsthedisplayconfigurationscollection.
SeeAlso|Example
Signature
object.DisplayConfigurations
objectAecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.
DisplayConfigurationsAecDisplayConfigurations;read-write
Page 338
DisplayHiddenLineworkPropertySpecifieswhetherhiddenlineworkisdisplayed.
SeeAlso|Example
Signature
object.DisplayHiddenLinework
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
DisplayHiddenLineworkBoolean;read-write
Page 339
DisplayNamePropertyThenamedisplayedfortheobject.
SeeAlso|Example
Signature
object.DisplayName
objectAecDisplayRepresentation,AecMVBlockDisplayRepDefTheobjectthispropertyappliesto.
DisplayNameString;read-write
Page 340
DisplayRepDefsPropertyReturnsthedisplayrepresentationdefinitionsforthemulti-viewblockstyle.
SeeAlso|Example
Signature
object.DisplayRepDefs
objectAecMVBlockStyleTheobjectthispropertyappliesto.
MVBlockDisplayRepDefsAecMVBlockDisplayRepDefs;read-write
Page 341
DisplayRepresentationsPropertyGetsthedisplayrepresentationscollection.
SeeAlso|Example
Signature
object.DisplayRepresentations
objectAecDisplaySet,AecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.
DisplayRepresentationsAecDisplayRepresentations;read-write
Remarks
YoucanappendtoorremovefromtheDisplayRepresentationscollectionwhenaccessedfromtheDisplaySet.
Page 342
DisplaySetPropertyGetsorsetsthethedisplaysetforagivenviewdirection.
SeeAlso|Example
Signature
RetVal=object.DisplaySet(ViewDir)
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
ViewDirAecViewDirection;input-onlyTheviewdirection.
RetValAecDisplaySetThedisplaysetthatappliesusedfortheviewdirection.
Page 343
DisplaySetsPropertyReturnsthecollectionofdisplaysets.
SeeAlso|Example
Signature
object.DisplaySets
objectAecBaseDatabase,AecBaseDocumentTheobjectthispropertyappliesto.
DisplaySetsAecDisplaySets;read-write
Page 344
DisplaySilhouettePropertyControlsifsilhouettecurvesofsolidobjectsaredisplayedinWireframemode.
SeeAlso|Example
Signature
object.DisplaySilhouette
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
DisplaySilhouetteBoolean;read-write
TRUE:Displayonlysilhouettelinesforsolidobjects.
FALSE:Displayisolinesforsolidobjects.
Systemvariables
ThevalueofthispropertyisstoredintheDISPSILHsystemvariable.
Remarks
TheinitialvalueforthispropertyisFALSE.
Page 345
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.
Page 346
DoubleHatchPropertySpecifiesifdoublehatchingisused.
SeeAlso|Example
Signature
object.DoubleHatch
objectAecDisplayComponentHatchTheobjectthispropertyappliesto.
DoubleHatchBoolean;read-write
Remarks
TheDoubleHatchpropertyapplieswhentheHatchTypeissettoaecHatchTypeUserDefined.
Page 347
EdgeWidthPropertySpecifiestheedgewidthofthepolygonstyle.
SeeAlso|Example
Signature
object.EdgeWidth
objectAecPolygonStyleTheobjectthispropertyappliesto.
EdgeWidthDouble;read-writeTheedgewidthofthepolygonstyle.
Page 348
EdgeWidthJustifyPropertySpecifieswhetheredgesaredisplayedinside,outside,orcenteredontheAECPolygonvertices.
SeeAlso|Example
Signature
object.EdgeWidthJustify
objectAecPolygonStyleTheobjectthispropertyappliesto.
EdgeWidthJustifyAecPolygonStyleEdgeWidthJustificationenum;read-writeTheedgejustificationofthepolygonstyle.
Page 349
ElevationModelSpacePropertySpecifiestheelevationsettinginthemodelspace.
SeeAlso|Example
Signature
object.ElevationModelSpace
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
ElevationModelSpaceDouble;read-writeTheelevationsettingformodelspace.
Remarks
ThecurrentelevationistheZvaluethatisusedwhenevera3DpointisexpectedbutonlytheXandYvaluesaresupplied.Thecurrentelevationismaintainedseparatelyinmodelspaceandpaperspace.
Page 350
ElevationPaperSpacePropertySpecifiestheelevationsettinginthepaperspace.
SeeAlso|Example
Signature
object.ElevationPaperSpace
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
ElevationPaperSpaceDouble;read-writeTheelevationforpaperspace.
Remarks
ThecurrentelevationistheZvaluethatisusedwhenevera3DpointisexpectedbutonlytheXandYvaluesaresupplied.Thecurrentelevationismaintainedseparatelyinmodelspaceandpaperspace.
Page 351
ElevationPrecisionPropertySpecifiestheprecisiontowhichelevationmeasurementsaredisplayedinthedrawing.
SeeAlso|Example
Signature
object.ElevationPrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
ElevationPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.
Remarks
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.
Page 352
EndOffsetPropertySpecifiestheoffsetdistancefromtheendpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.
SeeAlso|Example
Signature
object.EndOffset
objectAecLayoutCurveTheobjectthispropertyappliesto.
EndOffsetDouble;read-writeOffsetdistancefromendpointofthecurve.
Page 353
ExcludeFrom2dSectionShrinkwrapPropertySpecifieswhetherthematerialisexcludedfromtheshrinkwrapofa2Dsection.
SeeAlso|Example
Signature
object.ExcludeFrom2dSectionShrinkwrap
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
ExcludeFrom2dSectionShrinkwrapBoolean;read-write
Page 354
FacetDeviationPropertySpecifiesthealloweddeviationwhenfacettingcurvedlinesandsurfaces.
SeeAlso|Example
Signature
object.FacetDeviation
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
FacetDeviationDouble;read-writeThefacetdeviationofAEC3DObjects.
Systemvariables
ThevalueofthispropertyisstoredintheFACETDEVsystemvariable.
Remarks
FacetdeviationissimilartoFacetResforACISbodies.
Page 355
FacetMaximumPropertySpecifiesthemaximumnumberoffacetsusedforacircle.
SeeAlso|Example
Signature
object.FacetMaximum
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
FacetMaximumInteger;read-writeThemaximumnumberoffacetsusedforacircle.
Page 356
FixedViewDirectionPropertyGetsorsetsafixedviewdirectionforadisplayconfiguration.
SeeAlso|Example
Signature
object.FixedViewDirection
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
FixedViewDirectionAecFixedViewDirection;read-write
Page 357
FlipXPropertyDeterminesiftheanchoredobjectisflippedabouttheXaxisofthecurveitisanchoredto.
SeeAlso|Example
Signature
object.FlipX
objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
FlipXBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheXaxis.FALSE:AnchoredobjectisnotflippedaroundtheXaxis.
Page 358
FlipYPropertyDeterminesiftheanchoredobjectisflippedabouttheYaxisofthecurveitisanchoredto.
SeeAlso|Example
Signature
object.FlipY
objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
FlipYBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheYaxis.FALSE:AnchoredobjectisnotflippedaroundtheYaxis.
Page 359
FlipZPropertyDeterminesiftheanchoredobjectisflippedabouttheZaxisofthecurveitisanchoredto.
SeeAlso|Example
Signature
object.FlipZ
objectAecAnchorEntToCurve,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
FlipZBoolean;read-writeTRUE:AnchoredobjectisflippedaroundtheZaxis.FALSE:AnchoredobjectisnotflippedaroundtheZaxis.
Page 360
GroupsPropertyGetstheGroupscollectionforthedocument.
SeeAlso|Example
Signature
object.Groups
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
GroupsAcadGroupscollection;read-onlyTheGroupscollectionforthedocument.
Page 361
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.
Page 362
Remarks
AnobjectIDandauniquehandlearethetwowaysofreferencinganobject.Ahandleispersistent(staysthesame)inadrawingforthelifetimeoftheobject.
Ingeneral,useahandleunlessyouplantoworkwithcertainObjectARXfunctionsthatrequireanobjectID.
Page 363
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
Page 364
withit.
FALSE:Theobjectdoesnothaveanextensiondictionaryassociatedwithit.
Remarks
Youcancreateanextensiondictionaryforanobject,orqueryanexistingextensiondictionarybyusingtheGetExtensionDictionarymethod.
Page 365
HatchTypePropertyGetsorsetsthehatchtypeforthedisplaycomponent.
SeeAlso|Example
Signature
object.HatchType
objectAecDisplayComponentHatchTheobjectthispropertyappliesto.
HatchTypeAecHatchType;read-write
Page 366
HeightPropertySpecifiestheheightoftheobject.
SeeAlso|Example
Signature
object.Height
objectAecClipVol,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.
HeightDouble;read-writeTherelativeheightoftheobject.
Page 367
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.
Page 368
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.
Page 369
InsertionPointPropertySpecifiestheinsertionpointoftheprofile.
SeeAlso|Example
Signature
object.InsertionPoint
objectAecEditInPlaceProfileTheobjectthispropertyappliesto.
InsertionPointVariant(three-elementarrayofdoubles);read-writeTheinsertionpointoftheprofile.
Page 370
InsideRadiusPropertySpecifiestheinsideradiusofthelayoutgrid.
SeeAlso|Example
Signature
object.InsideRadius
objectAecLayoutGrid2DTheobjectthispropertyappliesto.
InsideRadiusDouble;read-writeTheinsideradiusofthelayoutgrid.
Page 371
InterferenceBlockNamePropertySpecifiesthenameoftheinterferenceblockfortheMulti-viewblock.
SeeAlso|Example
Signature
object.InterferenceBlockName
objectAecMVBlockStyleTheobjectthispropertyappliesto.
InterferenceBlockNameString;read-write
Page 372
KeysPropertyReturnsthecollectionoflayerkeysinalayerkeystyle.
SeeAlso|Example
Signature
object.Keys
objectAecLayerKeyStyleTheobjectthispropertyappliesto.
KeysAecLayerKeys;read-onlyReturnsthecollectionofAecLayerKeys.
Page 373
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.
Page 374
LayerFilePropertySpecifiesthenameofthefilecontainingdefaultlayerstandardandkeystyledefinitions.
SeeAlso|Example
Signature
object.LayerFile
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
LayerFileString;read-writeThenameofthelayerfile.
Remarks
Thelayerfileisstoredasaglobalsettingintheregistry,andnotonaper-drawingbasis.AnentryismaintainedforeachMeasurementUnit.
Page 375
LayerKeyStylePropertySpecifiesthelayerkeystylefortheobject.
SeeAlso|Example
Signature
object.LayerKeyStyle
objectAecLayerKey,AecLayerKeys,AecLayerOverrideSetting,AecLayerOverrideSettingsTheobjectthispropertyappliesto.
LayerKeyStyleAecLayerKeyStyle;read-writeLayerkeystyleoftheobject.
Page 376
LayersPropertyGetstheLayerscollectionforthedocument.
SeeAlso|Example
Signature
object.Layers
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
LayersAcadLayerscollection;read-onlyTheLayerscollectionforthedocument.
Page 377
LayerStandardPropertyThelayerstandardtoapplytothedrawing.
SeeAlso|Example
Signature
object.LayerStandard
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
LayerStandardString;read-writeThenameofthelayerstandard.
Remarks
Thelayerstandardsarestoredonaperdrawingbasisinthedictionary.
Page 378
LayoutCurvePropertyProvidesaccesstolayoutcurvegeometry.
SeeAlso|Example
Signature
object.LayoutCurve
objectAecLayoutCurveNode,AecLayoutCurveNodesTheobjectthispropertyappliesto.
LayoutCurveAecLayoutCurve;read-writeAlayoutcurveobject.
Page 379
LayoutGrid2DPropertyIdentifiesthe2Dlayoutgridthatownstheobject.
SeeAlso|Example
Signature
object.LayoutGrid2D
objectAecLayoutGrid2DNode,AecLayoutGrid2DNodes,AecLayoutGrid2DXNode,AecLayoutGrid2DXNodes,AecLayoutGrid2DYNode,AecLayoutGrid2DYNodesTheobjectthispropertyappliesto.
LayoutGrid2DAecLayoutGrid2D;read-writeThelayoutgridthatownsthelayoutgridnodeorcollectionofnodes.
Page 380
LayoutGrid3DPropertyIdentifiesthe3Dlayoutgridthatownstheobject.
SeeAlso|Example
Signature
object.LayoutGrid3D
objectAecLayoutGrid3DNode,AecLayoutGrid3DNodes,AecLayoutGrid3DXNode,AecLayoutGrid3DXNodes,AecLayoutGrid3DYNode,AecLayoutGrid3DYNodes,AecLayoutGrid3DZNode,AecLayoutGrid3DZNodesTheobjectthispropertyappliesto.
LayoutGrid3DAecLayoutGrid3D;read-writeThe3Dlayoutgridthatownsthelayoutgridnodeorcollectionofnodes.
Page 381
LayoutsPropertyGetstheLayoutscollectionforthedocument.
SeeAlso|Example
Signature
object.Layouts
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
LayoutsAcadLayoutsobject;read-onlyTheLayoutscollectionforthedocument.
Page 382
LeaderExtension1PropertySpecifiesthefirstleaderextension.
SeeAlso|Example
Signature
object.LeaderExtension1
objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
LeaderExtension1Double;read-writeThefirstleaderextension.
Page 383
LeaderExtension2PropertySpecifiesthesecondleaderextension.
SeeAlso|Example
Signature
object.LeaderExtension2
objectAecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
LeaderExtension2Double;read-writeThesecondleaderextension.
Page 384
LeftOffsetPropertySpecifiestheleftoffsetfortheanchoredobject.
SeeAlso|Example
Signature
object.LeftOffset
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
LeftOffsetDouble;read-writeTheleftoffsetfortheanchoredobject.(SeeRemarks.)
Remarks
TochangetheLeftOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingLeftOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Page 385
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.
Page 386
LinearDisplayFormatProperty
Specifiestheformatusedtodisplaylinearmeasurementvalues.
SeeAlso|Example
Signature
object.LinearDisplayFormat
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
LinearDisplayFormatLong;read-writeTheformatusedtodisplaylinearmeasurementvalues.Canbeoneofthefollowing:
1: Scientific
2: Decimal
3: Engineering
4: Architectural
5: Fractional
Page 387
LinearPrecisionPropertySpecifiesthelinearprecisionforthedrawing.
SeeAlso|Example
Signature
object.LinearPrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
LinearPrecisionLong;read-writeThenumberofdecimalstotherightofthedecimalpoint.
Remarks
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.
Page 388
LinearUnitPropertySpecifiestheunitusedtodisplaylinearvalues.
SeeAlso|Example
Signature
object.LinearUnit
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
LinearUnitsAecBuiltInUnitenum;read-writeTheunitusedtodisplaylinearvalues.Specifyoneofthefollowing:
aecUnitInch: Inches
aecUnitFoot: Feet
aecUnitMillimeter: Millimeters
aecUnitCentimeter: Centimeters
aecUnitDecimeter: Decimeters
aecUnitMeter: Meters
Page 389
Remarks
Usethispropertytospecifywhetheryouwanttousefeetormetersinyourdrawing.
Thelinearunitsthatyouselectmustbethesameforalldrawingsinaproject.Youcannotmixfoot-baseddrawingswithmeter-baseddrawingsinthesameproject.
Page 390
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.
Page 391
LinetypesPropertyGetstheLinetypescollectionforthedocument.
SeeAlso|Example
Signature
object.Linetypes
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
LinetypesAcadLineTypescollection;read-onlyTheLinetypescollectionforthedocument.
Page 392
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
Page 393
Linetypescale=0.25
Page 394
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.
Page 395
LineweightDisplayPropertySpecifieswhetherlineweightsaredisplayedinmodelspaceforthedrawing.
SeeAlso|Example
Signature
object.LineweightDisplay
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
LineweightDisplayBoolean;read-write
TRUE:Lineweightsaredisplayedinmodelspace.
FALSE:Lineweightsarenotdisplayedinmodelspace.
Remarks
TheinitialvalueforthispropertyisTRUE.
Regenerationtimeincreaseswithlineweightsthatarerepresentedbymorethanonepixel.SetthispropertytoFALSEifperformanceslowsdownwhenworkingwithlargelineweights.
Page 396
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.
Page 397
LowerExtensionPropertySpecifiesthedistanceofthelowercutplanebelowtheclipvolumeposition.
SeeAlso|Example
Signature
object.LowerExtension
objectAecClipVolTheobjectthispropertyappliesto.
LowerExtensionDouble;read-writeDistanceofthelowercutplanebelowclipvolumeposition.
Page 398
MassElementStylesPropertyReturnsthecollectionofmasselementstylesinthespecifieddrawingdatabase.
SeeAlso|Example
Signature
object.MassElementStyles
objectAecBaseDatabaseTheobjectthispropertyappliesto.
MassElementStylesAecMassElementStyles;read-writeThecollectionofmasselementstyles.
Page 399
MassGroupPropertyGetsorsetstheparentmassgroupofamasselementormassgroup.
SeeAlso|Example
Signature
object.MassGroup
objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.
MassGroupAecMassGroup;read-writeTheparentmassgroup,ifany.
Page 400
MassGroupNamePropertySpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.
SeeAlso|Example
Signature
object.MassGroupName
objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.
MassGroupNameString;read-writeSpecifiesthemassgroupthatthemasselementorgroupiscurrentlyattachedto.
Page 401
MaxActiveViewportsPropertySpecifiesthemaximumnumberofactiveviewports.
SeeAlso|Example
Signature
object.MaxActiveViewports
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
MaxActiveViewportsInteger;read-writeThemaximumnumberofactiveviewports.2<=MaxActiveViewports<=48
Systemvariables
ThevalueofthispropertyisstoredintheMAXACTVPsystemvariable.
Remarks
Inactiveviewportsareblank,sotheircontentsarenotregenerated.Youcan,therefore,improveperformancebyspecifyingalowvalue.Theinitialvalueis48.
Page 402
MeasurementUnitProperty
Identifiesthesystemofunitsusedtodisplaymeasurementsinthedrawing.
SeeAlso|Example
Signature
object.MeasurementUnit
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
MeasurementUnitAcMeasurementUnitenum;read-onlyThesystemofunitsusedtodisplaymeasurements.Canbeoneofthefollowing:
acEnglish: English(Imperial)units
acMetric: Metricunits
Page 403
MergeCommonMaterialsPropertySpecifieswhethercommonmaterialsaremergedintoonecomponent.
SeeAlso|Example
Signature
object.MergeCommonMaterials
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
MergeCommonMaterialsBoolean;read-write
Page 404
ModelSpacePropertyGetstheModelSpacecollectionforthedocument.
SeeAlso|Example
Signature
object.ModelSpace
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
ModelSpaceAcadModelSpacecollection;read-onlyTheModelSpacecollectionforthedocument.
Page 405
MVBlockRefPropertyGetsorsetsamulti-viewblockreferenceforaviewblockorcollectionofviewblocks.
SeeAlso|Example
Signature
object.MVBlockRef
objectAecViewBlock,AecViewBlocksTheobjectthispropertyappliesto.
MVBlockRefAecMVBlockRef;read-writeReferenceofamulti-viewblockinsertedintoadrawing.
Page 406
NamePropertyReturnsthenameoftheobject.
SeeAlso|Example
Signature
object.Name
objectAecCamera,AecDictRecord,AecLayerKey,AecLayerKeyStyle,AecLayerOverrideSetting,AecMaskBlockStyle,AecMassGroup,AecMVBlockStyle,AecPolygonStyle,AecProfileStyle,AecViewBlock,AecDisplayComponentTheobjectthispropertyappliesto.
NameString;read-onlyforallobjectsexceptAecCamera.Thenameoftheobject.
Page 407
NodePropertySpecifiesthelayoutnodetheanchorattachesanobjectto.
SeeAlso|Example
Signature
object.Node
objectAecAnchorEntToLayoutNode,AecAnchorLeadEntToNode,AecAnchorEntToLayoutVolume,AecAnchorEntToLayoutCellTheanchorobjectthispropertyappliesto.
NodeLong;read-writeNodeentityisanchoredto.Thefirstnodeonthegridis1.
Page 408
NodesPropertyReturnsthecollectionofnodesonthelayoutcurve.
SeeAlso|Example
Signature
object.Nodes
objectAecLayoutCurveTheobjectthispropertyappliesto.
NodesAecLayoutNodes;read-onlyThecollectionofnodesonthecurve.
Page 409
NorthRotationPropertySpecifiestheanglealignedtonorthwithinadrawing.
SeeAlso|Example
Signature
object.NorthRotation
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
NorthRotationDouble;read-writeThenorthrotationangle.Theangleisinradiansandmeasuredcounter-clockwisefromtheXaxis(East).
Remarks
Theinitialvalueforthispropertyis0.
IfyouchangetheNorthRotationinanexistingdrawingthenyoumustmoveanyobjectsinthedrawingtomatchthenewcoordinatesystem.
Page 410
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.
Page 411
Remarks
AnobjectIDandauniquehandlearebothwaysofreferencinganobject.
Ingeneral,useahandleunlessyouplantoworkwithcertainObjectARXfunctionsthatrequireanobjectID.
Page 412
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.
Page 413
ObjectSortByPlottingPropertyTogglessortingofdrawingobjectsbyplottingorder.
SeeAlso|Example
Signature
object.ObjectSortByPlotting
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortByPlottingBoolean;read-write
TRUE:Enablesortbyplottingorder.
FALSE:Disablesortbyplottingorder.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisTRUE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 414
ObjectSortByPSOutputPropertyTogglessortingofdrawingobjectsbyPostScriptoutputorder.
SeeAlso|Example
Signature
object.ObjectSortByPSOutput
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortByPSOutputBoolean;read-write
TRUE:EnablesortbyPostScriptoutputorder.
FALSE:DisablesortbyPostScriptoutputorder.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisTRUE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 415
ObjectSortByRedrawsPropertyTogglessortingofdrawingobjectsbyredraworder.
SeeAlso|Example
Signature
object.ObjectSortByRedraws
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortByRedrawsBoolean;read-write
TRUE:Enablesortbyredraworder.
FALSE:Disablesortbyredraworder.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisFALSE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 416
ObjectSortByRegensPropertyTogglessortingofdrawingobjectsbyregenerationorder.
SeeAlso|Example
Signature
object.ObjectSortByRegens
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortByRegensBoolean;read-write
TRUE:Enablesortbyregenerationorder.
FALSE:Disablesortbyregenerationorder.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisFALSE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 417
ObjectSortBySelectionPropertyTogglessortingofdrawingobjectsbyobjectselection.
SeeAlso|Example
Signature
object.ObjectSortBySelection
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortBySelectionBoolean;read-write
TRUE:Enablesortbyobjectselection.
FALSE:Disablesortbyobjectselection.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisFALSE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 418
ObjectSortBySnapPropertyTogglessortingofdrawingobjectsbyobjectsnap.
SeeAlso|Example
Signature
object.ObjectSortBySnap
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
ObjectSortBySnapBoolean;read-write
TRUE:Enablesortbyobjectsnap.
FALSE:Disablesortbyobjectsnap.
Systemvariables
ThevalueofthispropertyisstoredintheSORTENTSsystemvariable.
Remarks
TheinitialvalueofthispropertyisFALSE.
Initially,sortingisenabledforplottingandPostScriptoutputonly.Settingadditionalsortingoptionscanresultinslowerregenerationandredrawingtimes.
Page 419
OffsetPropertySpecifiestheoffsetfromtheobject.
SeeAlso|Example
Signature
object.Offset
objectAecAnchorLeadEntToNode,AecAnchorEntTolayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecEntRefTheobjectthispropertyappliesto.
OffsetVariant;read-writeOffsetfromthelayoutnodeorentityreference.
Page 420
OLELaunchPropertyDetermineswhethertolaunchtheparentapplicationwhenplottingOLEobjects.
SeeAlso|Example
Signature
object.OLELaunch
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
OLELaunchBoolean;read-write
TRUE:TheparentapplicationofanOLEobjectislaunchedtoprintit.
FALSE:TheOLEobjectisprintedfromthecurrentapplication.
Systemvariables
ThevalueofthispropertyisstoredintheOLESTARTUPsystemvariable.
Remarks
TheinitialvalueofthispropertyisFALSE.
Plottingfromtheparentapplicationachievesahigherqualityplot;however,thespeedoftheplotisdecreased.
Page 421
OperationPropertySpecifieshowobjectsarecombined.
SeeAlso|Example
Signature
object.Operation
objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.
OperationAecMassOperationenum;read-writeBooleanoperation:addition,subtraction,orintersection.
Page 422
OverrideDisplayPropertiesPropertyThecollectionofdisplaypropertyoverridesforthedisplayrepresentation.
SeeAlso|Example
Signature
object.OverrideDisplayPropertiesAecObject
objectAecDisplayRepresentationTheobjectthispropertyappliesto.
OverrideDisplayPropertiesAecDisplayProperties;read-write
AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.
Remarks
Overridescanbeappliedbyobjectorbystyle.
Page 423
OverridesEnabledPropertySpecifieswhetherlayeroverridesareappliedtothestylewhenalayerisgeneratedfromakey.
SeeAlso|Example
Signature
object.OverridesEnabled
objectAecLayerKeyStyleTheobjectthispropertyappliesto.
OverridesEnabledBoolean;read-writeTRUE:Overridesareapplied.FALSE:Overridesarenotapplied.
Page 424
OverrideSettingsPropertyReturnsthecollectionoflayerkeyoverridesettingsforalayerkeystyle.
SeeAlso|Example
Signature
object.OverrideSettings
objectAecLayerKeyStyleTheobjectthispropertyappliesto.
OverrideSettingsAecLayerOverrideSettings;read-onlyThecollectionoflayerkeyoverridesettings.
Page 425
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.
Page 426
PaperSpacePropertyGetsthePaperSpacecollectionforthedocument.
SeeAlso|Example
Signature
object.PaperSpace
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
PaperSpaceAcadPaperSpacecollection;read-onlyThePaperSpacecollectionforthedocument.
Page 427
PatternNamePropertyGetsorsetsthenameofthecustomhatchpattern.
SeeAlso|Example
Signature
object.PatternName
objectAecDisplayComponentHatchTheobjectthispropertyappliesto.
PatternNameString;read-write
Remarks
ThePatternNameapplieswhentheHatchTypeissettoaecHatchTypeCustomDefined.
Page 428
PerimeterPropertySpecifiestheperimeteroftheprofile.
SeeAlso|Example
Signature
object.Perimeter
objectAecProfileTheobjectthispropertyappliesto.
PerimeterDouble;read-only
Page 429
PlaneDepthPropertySpecifiestheplanedepthoftheslice.
SeeAlso|Example
Signature
object.PlaneDepth
objectAecSliceTheobjectthispropertyappliesto.
PlaneDepthDouble;read-write
Page 430
PlaneWidthPropertySpecifiestheplanewidthoftheslice.
SeeAlso|Example
Signature
object.PlaneWidth
objectAecSliceTheobjectthispropertyappliesto.
PlaneWidthDouble;read-write
Page 431
PlotConfigurationsPropertyGetsthePlotConfigurationscollectionforthedocument.
SeeAlso|Example
Signature
object.PlotConfigurations
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
PlotConfigurationsAcadPlotConfigurationscollection;read-onlyThePlotConfigurationscollectionforthedocument.
Page 432
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.
Page 433
PlottablePropertySpecifieswhetherthelayergeneratedfromthekeyisplottable.
SeeAlso|Example
Signature
object.Plottable
objectAecLayerKeyTheobjectthispropertyappliesto.
PlottableBoolean;read-writeTRUE:LayerisplottableFALSE:Layerisnotplottable
Page 434
PolygonStylesPropertyReturnsthecollectionofpolygonstylesinthespecifieddrawingdatabase.
SeeAlso|Example
Signature
object.PolygonStyles
objectAecBaseDatabaseTheobjectthispropertyappliesto.
PolygonStylesAecPolygonStyles;read-onlyThecollectionofpolygonstyles.
Page 435
PreferencesPropertyReturnsthePreferencesobjectforthespecifieddrawing.
SeeAlso|Example
Signature
object.Preferences
objectAecBaseDatabase,AecDatabaseTheobjectthispropertyappliesto.
Preferences
AcadDatabasePreferences;read-onlyThePreferencesobjectforthedrawing.
Page 436
ProfilePropertyReturnsorsetstheobject'sprofile.
SeeAlso|Example
Signature
object.Profile
objectAecEditInPlaceProfile,AecPolygon,AecProfileStyle,AecRing,AecRings,AecMassElement,AecSliceTheobjectthispropertyappliesto.
ProfileAecProfile;read-writeTheobject'sprofile.
Page 437
ProfileStylePropertySpecifiestheprofilestyleofthemasselement.
SeeAlso|Example
Signature
object.ProfileStyle
objectAecMassElementTheobjectthispropertyappliesto.
ProfileStyleAecProfileStyle;read-writeTheprofilestyleofthemasselement.
Page 438
ProfileStyleNamePropertySpecifiesthenameoftheobject'sprofilestyle.
SeeAlso|Example
Signature
object.ProfileStyleName
objectAecEditInPlaceProfile,AecMassElementTheobjectsthispropertyappliesto.
ProfileStyleNameString;read-writeThenameoftheprofilestyle.
Page 439
ProjectNamePropertySpecifiesthenameoftheprojectthatthedrawingbelongsto.
SeeAlso|Example
Signature
object.ProjectName
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
ProjectNameString;read-writeTheprojectname.
Remarks
Theprojectnamecanbenomorethan255charactersinlength.
Page 440
RadiusPropertySpecifiestheradiusofcurvedmasselements.
SeeAlso|Example
Signature
object.Radius
objectAecMassElementTheobjectthispropertyappliesto.
RadiusDouble;read-writeTheradiusofthemasselement.
Page 441
ReferencePropertySpecifiestheobjectbeinganchoredto.
SeeAlso|Example
Signature
object.Reference
objectAecAnchorEntToLayoutCell,AecAnchorEntToCurve,AecAnchorLeadEntToNode,AecAnchorEntToGridAssembly,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorExtendedTagToEntAecAnchorToRefTheobjectthispropertyappliesto.
ReferenceAcadEntity;read-write,exceptforAecAnchorEntToGridAssembly,whichisread-only.Theobjectbeinganchoredto.
Page 442
RegisteredApplicationsPropertyGetstheRegisteredApplicationscollectionforthedocument.
SeeAlso|Example
Signature
object.RegisteredApplications
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
RegisteredApplicationsAcadRegisteredApplicationscollection;read-onlyTheRegisteredApplicationscollectionforthedocument.
Page 443
RemoveablePropertySpecifieswhetheryoucanremovethelayerkeyfromthelayerkeystyle.
SeeAlso|Example
Signature
object.Removeable
objectAecLayerKeyTheobjectthispropertyappliesto.
RemoveableBoolean;read-onlyTRUE:Layerkeyisremovable.FALSE:Layerkeyisnotremovable.
Page 444
RenderSmoothnessPropertySpecifiesthesmoothnessofshaded,rendered,andhiddenline-removedobjects.
SeeAlso|Example
Signature
object.RenderSmoothness
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
RenderSmoothnessDouble;read-writeThevalidrangeis0.01to10.0.
Systemvariables
ThevalueofthispropertyisstoredintheFACETRESsystemvariable.
Remarks
Theinitialvalueforthispropertyis0.5.Toimproveperformance,setthisvalueto1orlesswhendrawing.
Page 445
ResizeOffsetPropertySpecifiestheoffsetoftheanchoredobjecttothecellboundarywhenthecellisresized.
SeeAlso|Example
Signature
object.ResizeOffset
objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutVolumeTheobjectthispropertyappliesto.
ResizeOffsetDouble;read-writeTheoffsetfromthecelltotheanchoredobject.
Remarks
TochangetheResizeOffsetvalue,youmustfirstsetApplyResizetoTrue.ModifyingResizeOffsetwhenApplyResizeisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Tospecifyadistancebetweentheanchoredobjectandthecell,specifyanegativevalueforResizeOffset.Toextendtheanchoredobjectbeyondthecelledges,specifyapositivevalue.
Page 446
RightOffsetPropertySpecifiestherightoffsetfortheanchoredobject.
SeeAlso|Example
Signature
object.RightOffset
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
RightOffsetDouble;read-writeTherightoffsetfortheanchoredobject.
Remarks
TochangetheRightOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingRightOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Page 447
RingsPropertyReturnsthecollectionofringsthatmakeuptheprofile.
SeeAlso|Example
Signature
object.Rings
objectAecProfileTheobjectthispropertyappliesto.
RingsAecRings;read-onlyCollectionofringsthatmakeuptheprofile.
Page 448
RisePropertySpecifiestheriseofgabledmasselements.
SeeAlso|Example
Signature
object.Rise
objectAecMassElementTheobjectthispropertyappliesto.
RiseDouble;read-writeTheriseofthegabledmasselement.
Page 449
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.
Page 450
ScalePropertySpecifiesthescalefactorappliedtothehatchpattern.
SeeAlso|Example
Signature
object.Scale
objectAecDisplayComponentHatchTheobjectthispropertyappliesto.
ScaleDouble;read-write
Remarks
TheScalepropertydetermineshowthehatchpatternisrepeated.
Page 451
ScaleOnInsertPropertySpecifieswhetherobjectsareautomaticallyscaledwheninsertedintothedrawing.
SeeAlso|Example
Signature
object.ScaleOnInsert
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
ScaleOnInsertBoolean;read-writeTRUE:Newobjectsarescaledautomatically.FALSE:Newobjectsarenotscaledautomatically.
Page 452
ScaleXPropertySpecifiestheXdirectionscalefactoroftheinsertedblockorentity.
SeeAlso|Example
Signature
object.ScaleX
objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.
ScaleXDouble;read-writeScaleoftheblockintheXdirection.
Page 453
ScaleYPropertySpecifiestheYdirectionscalefactoroftheinsertedblockorentity.
SeeAlso|Example
Signature
object.ScaleY
objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.
ScaleYDouble;read-writeScaleoftheblockintheYdirection.
Page 454
ScaleZPropertySpecifiestheZdirectionscalefactoroftheinsertedblockorentity.
SeeAlso|Example
Signature
object.ScaleZ
objectAecBlockRef,AecEntRef,AecMaskBlockRef,AecMVBlockRefTheobjectthispropertyappliesto.
ScaleZDouble;read-writeScaleoftheblockintheZdirection.
Page 455
SectionedBodyRenderingMaterialNamePropertyGetsorsetsthenameofthesectionedbodyrenderingmaterial.
SeeAlso|Example
Signature
object.SectionedBodyRenderingMaterialName
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
SectionedBodyRenderingMaterialNameString;read-write
Page 456
SectionRenderingMaterialNamePropertyGetsorsetsthenameofthesectionrenderingmaterial.
SeeAlso|Example
Signature
object.SectionRenderingMaterialName
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
SectionRenderingMaterialNameString;read-write
Page 457
SegmentPerPolylinePropertySpecifiesthenumberoflinesegmentstobegeneratedforeachpolylinecurve.
SeeAlso|Example
Signature
object.SegmentPerPolyline
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
SegmentPerPolylineInteger;read-writeThenumberoflinesegmentstobegeneratedforeachpolylinecurve.0<SegmentPerPolyline<=42950
Systemvariables
ThevalueofthispropertyisstoredintheSPLINESEGSsystemvariable.
Remarks
Theinitialvalueis8.Thehigherthenumberyouspecify,thegreatertheperformanceimpact.
Page 458
SelfIntersectsPropertyDeterminesiftheprofileisself-intersecting.
SeeAlso|Example
Signature
object.SelfIntersects
objectAecProfileTheobjectthispropertyappliesto.
SelfIntersectsBoolean;read-onlyTRUE:Profileintersectsitself.FALSE:Profiledoesnotintersectitself.
Page 459
ShapePropertySpecifiestheshapeofthelayoutgrid.
SeeAlso|Example
Signature
object.Shape
objectAecLayoutGrid2DTheobjectthispropertyappliesto.
ShapeAecLayoutShapeenum;read-write
Theshapeofthelayoutgrid.
Page 460
Side1PropertySpecifiesthelengthofthecutplanealongthestartingedge.
SeeAlso|Example
Signature
object.Side1
objectAecClipVolTheobjectthispropertyappliesto.
Side1Double;read-writeThelengthofthecutplanealongthestartingedge.
Page 461
Side2PropertySpecifiesthelengthofthecutplanealongtheendingedge.
SeeAlso|Example
Signature
object.Side2
objectAecClipVolTheobjectthispropertyappliesto.
Side2Double;read-writeLengthofcutplanealongtheendingedge.
Page 462
SolidFillPropertySpecifiesifmultilines,traces,solids,allhatches(includingsolid-fill)andwidepolylinesarefilledin.
SeeAlso|Example
Signature
object.SolidFill
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
SolidFillBoolean;read-write
TRUE:Displayssolidfills.
FALSE:Doesnotdisplaysolidfills.
Systemvariables
ThevalueofthispropertyisstoredintheFILLMODEsystemvariable.
Remarks
TheinitialvalueofthispropertyisTRUE.
Page 463
SpacingPropertySpecifiesthespacingbetweennodesorforanindividualnodeonalayouttool,orthespacingbetweenrepeatedhatchpatternsforadisplaycomponent.
SeeAlso|Example
Signature
object.Spacing
objectAecDisplayComponentHatch,AecLayoutCurve,AecLayoutCurveNode,AecLayoutGrid2DNode,AecLayoutGrid2DXNode,AecLayoutGrid2DYNode,AecLayoutGrid3DNode,AecLayoutGrid3DXNode,AecLayoutGrid3DYNode,AecLayoutGrid3DZNode,AecLayoutNodeTheobjectthispropertyappliesto.
SpacingDouble;read-writeThespacingbetweennodesorforanindividualnodeonalayouttool,orthespacingbetweenrepeatedhatchpatternsforadisplaycomponent.
Page 464
StartOffsetPropertySpecifiestheoffsetdistancefromthestartpointofthecurve,whichmaybeusedtoreducetheeffectivelayoutcurvelength.
SeeAlso|Example
Signature
object.StartOffset
objectAecLayoutCurveTheobjectthispropertyappliesto.
StartOffsetDouble;read-writeTheoffsetdistancefromthestartpointofthecurve.
Page 465
StylePropertySpecifiesthestyleoftheobject.
SeeAlso|Example
Signature
object.Style
objectAecMaskBlockRef,AecMassElement,AecMVBlockRef,AecPolygonTheobjectthispropertyappliesto.
StyleStyle;read-writeThestyleoftheobject.Thetypeofstyledependsonthetypeofobject,asfollows:
AecMaskBlockRef AecMaskBlockStyleAecMassElement AecMassElementStyleAecMVBlockRef AecMVBlockStyleAecPolygon AecPolygonStyle
Page 466
StyleNamePropertySpecifiesthenameofthestylethatappliestotheobject.
SeeAlso|Example
Signature
object.StyleName
objectAecMaskBlockRef,AecMVBlockRef,AecPolygonTheobjectthispropertyappliesto.
StyleNameString;read-writeThestylename.
Page 467
SubTypePropertySpecifiesthemasselementshapesubtype.
SeeAlso|Example
Signature
object.SubType
objectAecMassElementTheobjectthispropertyappliesto.
SubTypeAecMassElementSubType;read-only
Page 468
SupportsAnchoringPropertySpecifieswhetherthemassgroupsupportselementanchoring.
SeeAlso|Example
Signature
object.SupportsAnchoring
objectAecMassGroupTheobjectthispropertyappliesto.
SupportsAnchoringBoolean;read-write
Remarks
Thispropertyenablesenhancedmassgroupbehavior.
Page 469
SurfaceHatchPlacementPropertySpecifieshowthesurfacehatchpatternisplacedontheobject.
SeeAlso|Example
Signature
object.SurfaceHatchPlacement
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
SurfaceHatchPlacementAecSurfaceHatchPlacement;read-write
Page 470
SurfaceRenderingMaterialNamePropertyGetsorsetsthenameofthesurfacerenderingmaterial.
SeeAlso|Example
Signature
object.SurfaceRenderingMaterialName
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
SurfaceRenderingMaterialNameString;read-write
Page 471
SurfaceRenderMaterialMappingPropertySpecifieshowthesurfacerendermaterialismappedtotheobject.
SeeAlso|Example
Signature
object.SurfaceRenderMaterialMapping
objectAecDisplayPropertiesMaterialTheobjectthispropertyappliesto.
SurfaceRenderMaterialMappingAecSurfaceMappingType;read-write
Page 472
TextFrameDisplayPropertyTogglesthedisplayofframesfortextobjectsinsteadofdisplayingthetextitself.
SeeAlso|Example
Signature
object.TextFrameDisplay
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
TextFrameDisplayBoolean;read-write
TRUE:Displaystheframearoundtheextentsofthetext,butdoesnotdisplaythetextitself.
FALSE:Displaysthefulltext.
Systemvariables
ThevalueofthispropertyisstoredintheQTEXTMODEsystemvariable.
Remarks
TheinitialvalueforthispropertyisFALSE.
Afteryouenableordisablethisoption,youmustusetheRegenmethodtoupdatethedisplay.
Page 473
TextHeightPropertySpecifiesthedefaultheightoftextinthedrawing.
SeeAlso|Example
Signature
object.TextHeight
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
TextHeightDouble;read-writeThetextheightininchesormillimeters.
Remarks
Thedefaultvalueis0.125inches,or3.175millimeters,dependingonthesettingoftheMeasurementUnitproperty.
Page 474
TextStylesPropertyGetstheTextStylescollectionforthedocument.
SeeAlso|Example
Signature
object.TextStyles
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
TextStylesAcadTextStylescollection;read-onlyTheTextStylescollectionforthedocument.
Page 475
TopOffsetPropertySpecifythetopoffsetfortheanchoredobject.
SeeAlso|Example
Signature
object.TopOffset
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
TopOffsetDouble;read-writeThetopoffsetfortheanchoredobject.(SeeRemarks.)
Remarks
TochangetheTopOffsetvalue,youmustfirstsetAdjustSizingtoTrue.ModifyingTopOffsetwhenAdjustSizingisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Page 476
TypePropertyForlayoutcurves,specifieshownodesarespecifiedalongthecurve;formasselements,specifiestheshapeofthemasselement.
SeeAlso|Example
Signature
object.Type
objectAecLayoutCurve,AecMassElementTheobjectthispropertyappliesto.
TypeAecLayoutCurve:AecLayoutTypeenum;read-writeTypeofnodespacingalongthecurve.
AecMassElement:AecMassElementTypeenum;read-writeTheMassElementshape.
Page 477
UseAngleOfObjectPropertySpecifiestheorientationofthehatchpattern.
SeeAlso|Example
Signature
object.UseAngleOfObject
objectAecDisplayComponentHatchTheobjectthispropertyappliesto.
UseAngleOfObjectBoolean;read-writeTRUE:Orientthehatchingtotheobject,regardlessoftheobjectrotation.FALSE:OrientthehatchingtotheWorldCoordinateSystem.
Page 478
UseFixedViewDirectionPropertySpecifiesiftheFixedViewDirectionisusedforthedisplayconfiguration.
SeeAlso|Example
Signature
object.UseFixedViewDirection
objectAecDisplayConfigurationTheobjectthispropertyappliesto.
UseFixedViewDirectionBoolean;read-write
Page 479
UseModelExtentsPropertyDeterminesiftheheightandlowerextensionaresetautomaticallyusingmodelextents.
SeeAlso|Example
Signature
object.UseModelExtents
objectAecClipVolTheobjectthispropertyappliesto.
UseModelExtentsBoolean;read-writeTRUE:HeightandLowerExtensionaresetautomaticallyFALSE:HeightandLowerExtensionarenotsetautomatically
Page 480
UseOffsetPropertySpecifiesiftheoffsetvalueisused.
SeeAlso|Example
Signature
object.UseOffset
objectAecEntRefTheobjectthispropertyappliesto.
UseOffsetBoolean;read-write
Page 481
UserCoordinateSystemsPropertyGetstheUCSscollectionforthedocument.
SeeAlso|Example
Signature
object.UserCoordinateSystems
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
UserCoordinateSystemsAcadUCSscollection;read-onlyTheUCSscollectionforthedocument.
Page 482
ValidPropertyTeststhevalidityoftheobject.
SeeAlso|Example
Signature
object.Valid
objectAecProfile,AecRingTheobjectthispropertyappliesto.
ValidBoolean;read-onlyTRUE:Objectisvalid.FALSE:Objectisnotvalid.
Remarks
Aringisvalidifthefollowingaretrue:
Thereismorethanonesegment.Thesegmentsarecontinuous.Thesegmentsareclosed.Nosegmentintersectsitself.
Aprofileisvalidifeachringisclosedanddoesnotself-intersect,andtheprofileisnotselfintersecting.
Page 483
ValuePropertyForlayeroverrides,specifiesthevalueofthelayerkeystyleoverride;forlayoutcurves,specifieseitherthespacingbetweennodesorthenumberofnodesonthelayoutcurve.
SeeAlso|Example
Signature
object.Value
objectAecLayerOverrideSetting,AecLayoutCurveTheobjectthispropertyappliesto.
ValueAecLayerOverrideSetting:String;read-writeThestringthelayerkeyoverrideissetto.
AecLayoutCurve:Variant;read-writeBayspacingornumberofevendivisionsonalayoutcurve.
Remarks
AecLayoutCurve:
Ifthecurveusesmanualspacing,Valueiszero.
ChecktheTypepropertytodeterminewhatValuerepresents.
Page 484
VerticalScalePropertySpecifiesthescaleatwhichtheverticalaxisofthedrawingisdisplayed(inLandDevelopmentDesktoponly).
SeeAlso|Example
Signature
object.VerticalScale
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
HeadHeightDouble;read-writeTheverticalscale.Forexample,fora1:200scale,enter200.
Remarks
ThisisonlyusedinAutodeskLandDevelopmentDesktop.
Page 485
ViewBlockDefsPropertyReturnsthecollectionofviewblockdefinitionsforthemulti-viewblockdisplayrepresentationdefinition.
SeeAlso|Example
Signature
object.ViewBlockDefs
objectAecMVBlockDisplayRepDefTheobjectthispropertyappliesto.
ViewBlockDefsAecViewBlockDefs;read-write
Page 486
ViewBlocksPropertyReturnsthecollectionofviewblocksusedfordisplayrepresentationsbythemulti-viewblockreference.
SeeAlso|Example
Signature
object.ViewBlocks
objectAecMVBlockRefTheobjectthispropertyappliesto.
ViewBlocksAecViewBlocks;read-onlyThecollectionofviewblockreferences,witheachmulti-viewblockdisplayrepresentationmappedtoanindividualAcadBlock.
Page 487
ViewDirectionPropertySpecifiestheviewdirectionfortheviewblockdefinition.
SeeAlso|Example
Signature
object.ViewDirection
objectAecViewBlockDefTheobjectthispropertyappliesto.
ViewDirectionAecViewDirection;read-write
Page 488
ViewportsPropertyGetstheViewportscollectionforthedocument.
SeeAlso|Example
Signature
object.Viewports
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
ViewportsAcadViewportscollection;read-onlyTheViewportscollectionforthedocument.
Page 489
ViewsPropertyGetstheViewscollectionforthedocument.
SeeAlso|Example
Signature
object.Views
objectAecBaseDatabase,AecDatabaseTheobjectorobjectsthispropertyappliesto.
ViewsAcadViewscollection;read-onlyTheViewscollectionforthedocument.
Page 490
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.
Page 491
Specifyingtheapplicationtobeinvisibleallowsyoutoruntasksinthebackgroundwithouthavingtoseethecomponent.
Page 492
VoidPropertySpecifiesifaringproducesavoidinaprofile.
SeeAlso|Example
Signature
object.Void
objectAecRingTheobjectthispropertyappliesto.
VoidBoolean;read-writeTRUE:Ringisvoid.FALSE:Ringisadditive.
Page 493
VolumePropertyReturnsthevolumeofthemasselementormassgroup.
SeeAlso|Example
Signature
object.Volume
objectAecMassElement,AecMassGroupTheobjectthispropertyappliesto.
VolumeDouble;read-onlyThevolumeofthemasselementormassgroup.
Page 494
VolumeDisplayUnitPropertySpecifiestheunitsusedtodisplayvolumemeasurements.
SeeAlso|Example
Signature
object.VolumeDisplayUnit
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
VolumeDisplayUnitAecBuiltInUnitenum;read-writeTheunitsusedtodisplayvolumemeasurements.
Page 495
VolumePrecisionPropertySpecifiesthenumberofdecimalplacesdisplayedforvolumemeasurements.
SeeAlso|Example
Signature
object.VolumePrecision
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
VolumePrecisionLong;read-writeThedisplayprecisionforvolumemesurements.
Remarks
Theprecisionsettingsareusedonlyforlabelingandlistingvalues,notactualcomputations.
Page 496
VolumeSuffixPropertyThesuffixstringaddedwhenvolumemeasurementsaredisplayedinthedrawing.
SeeAlso|Example
Signature
object.VolumeSuffix
objectAecBaseDatabasePreferencesTheobjectthispropertyappliesto.
VolumeSuffixString;read-writeThesuffixdisplayedafterthevolumemeasurement.
Remarks
Thedefaultvalueis"Cu.Ft."or"m3",dependingonthevalueoftheMeasurementUnitproperty.Thevaluecanbeupto255charactersinlength.
Page 497
WidthPropertySpecifiesthewidthoftheobject.
SeeAlso|Example
Signature
object.Width
objectAecLayoutGrid2D,AecLayoutGrid3D,AecMassElementTheobjectthispropertyappliesto.
WidthDouble;read-writeThewidthoftheobject.
Page 498
WindowStatePropertySpecifiesthestateoftheapplicationordocumentwindow.
SeeAlso|Example
Signature
object.WindowState
objectAecBaseDocumentTheobjectorobjectsthispropertyappliesto.
WindowStateacWindowStateenum;read-writeIndicatesiftheapplicationwindowisminimizedormaximized.
Page 499
WindowTitlePropertyGetsthetitleofthedocumentwindow.
SeeAlso|Example
Signature
object.WindowTitle
objectAecBaseDocumentTheobjectorobjectsthispropertyappliesto.
WindowTitleString;read-onlyThewindowtitleofthedocument.
Page 500
XCountPropertySpecifiesthenumberofnodesalongtheXdirection.
SeeAlso|Example
Signature
object.XCount
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
XCountLong;read-writeThenumberofnodesalongtheXdirection.
Page 501
XDistancePropertySpecifiesthedistancealongthecurve'sXaxistotheanchoredobject.
SeeAlso|Example
Signature
object.XDistance
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
XDistanceDouble;read-writeDistancealongthecurve'sXaxistotheanchoredobject.
Page 502
XOffsetPropertySpecifiestheoffsetintheXdirectionoftheviewblockwithinthemulti-viewblock,orthexoffsetforthehatchpatternofadisplaycomponent.
SeeAlso|Example
Signature
object.XOffset
objectAecDisplayComponentHatch,AecViewBlockTheobjectthispropertyappliesto.
XOffsetDouble;read-writeTheoffsetintheXdirection.
Page 503
XPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheXDistancetoananchoredobjectismeasured.
SeeAlso|Example
Signature
object.XPositionFrom
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
XPositionFromAecCurvePositionenum;read-writeThepositiononthecurvefromwhichXDistanceismeasured.
Page 504
XPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureXDistanceto.
SeeAlso|Example
Signature
object.XPositionTo
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
XPositionToAecEdgePositionenum;read-writeThepositionthatXDistancemeasuresto.
Page 505
XRefEditPropertyDeterminesifthecurrentdrawingcanbeeditedinplacewhenbeingreferencedbyanotheruser.
SeeAlso|Example
Signature
object.XRefEdit
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
XRefEditBoolean;read-write
TRUE:Allowsin-placereferenceediting.
FALSE:Doesnotallowin-placereferenceediting.
Systemvariables
ThevalueofthispropertyisstoredintheXEDITsystemvariable.
Remarks
TheinitialvalueofthispropertyisTRUE.
Page 506
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
Page 507
notsavedwiththedrawing.Whenthecurrentdrawingisreopened,thelayertableisreloadedfromthereferencedrawingandthecurrentdrawingreflectsthosesettings.Thelayersettingsaffectedare:On/Off,Freeze/Thaw,Color,andLinetype.Thissettingalsospecifiesthatchangesmadetothepathsofnestedxrefsareforthecurrentsessiononlyandarenotsavedwiththedrawing.
Page 508
XrefOverlaysUseOwnDisplayConfigPropertyWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.
SeeAlso|Example
Signature
object.XrefOverlaysUseOwnDisplayConfig
objectAecBaseDatabasePreferencesTheobjectorobjectsthispropertyappliesto.
XrefOverlaysUseOwnDisplayConfigBoolean;read-writeWhenusedasanXrefOverlay,usethisdrawing'sdefaultdisplayconfigurationinitially.
Page 509
XRotationPropertySpecifiestherotationoftheanchoredobjectaroundtheXaxis.
SeeAlso|Example
Signature
object.XRotation
objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorEntToCurve,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
XRotationDouble;read-writeRotationoftheanchoredobjectaroundtheXaxis.
Page 510
XSpacingPropertySpecifiesthespacingbetweennodesalongtheXdirectionofthelayoutgrid.
SeeAlso|Example
Signature
object.XSpacing
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
XSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheXdirectionofthelayoutgrid.
Page 511
YAlignmentPropertySpecifiesthealignmentoftheanchoredobjectinrelationtothebaselineoftheassembly.
SeeAlso|Example
Signature
object.YAlignment
objectAecAnchorEntToGridAssemblyTheobjectthispropertyappliesto.
YAlignmentAecInfillAlignmentenum;read-writeAlignmentoftheinfillanchoredtotheassembly.(SeeRemarks.)
Remarks
TochangetheYAlignmentvalue,youmustfirstsetAllowVariationtoTrue.ModifyingYAlignmentwhenAllowVariationisFalsedoesnotresultinanerrororwarning,butithasnoeffect.
Page 512
YCountPropertySpecifiesthenumberofnodesalongtheYdirection.
SeeAlso|Example
Signature
object.YCount
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
YCountLong;read-writeThenumberofnodesalongtheYdirection.
Page 513
YDistancePropertySpecifiesthedistancealongthecurve'sYaxistotheanchoredobject.
SeeAlso|Example
Signature
object.YDistance
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
YDistanceDouble;read-writeDistancealongthecurve'sYaxistotheanchoredobject.
Page 514
YOffsetPropertySpecifiestheYoffsetoftheanchoredobject,ortheoffsetintheYdirectionoftheviewblockwithinthemulti-viewblock,ortheYoffsetforthehatchpatternofadisplaycomponent.
SeeAlso|Example
Signature
object.YOffset
objectAecAnchorEntToGridAssembly,AecDisplayComponentHatch,AecViewBlockTheobjectthispropertyappliesto.
YOffsetDouble;read-writeTheoffsetintheYdirection.
Page 515
YPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheYDistancetoananchoredobjectismeasured.
SeeAlso|Example
Signature
object.YPositionFrom
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
YPositionFromAecCurveWidthPositionenum;read-writeThepositiononthecurvefromwhichYDistanceismeasured.
Page 516
YPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureYDistanceto.
SeeAlso|Example
Signature
object.YPositionTo
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
YPositionToAecPositionenum;read-writeThepositionthatYDistancemeasuresto.
Page 517
YSpacingPropertySpecifiesthespacingbetweennodesalongtheYdirectionofthelayoutgrid.
SeeAlso|Example
Signature
object.YSpacing
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
YSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheYdirectionofthelayoutgrid.
Page 518
ZCountPropertySpecifiesthenumberofnodesalongtheZdirection.
SeeAlso|Example
Signature
object.ZCount
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
ZCountLong;read-writeThenumberofnodesalongtheZdirection.
Page 519
ZDistancePropertySpecifiesthedistanceabovethecurvetotheanchoredobject.
SeeAlso|Example
Signature
object.ZDistance
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
ZDistanceDouble;read-writeDistanceabovethecurvetotheanchoredobject.
Page 520
ZOffsetPropertySpecifiestheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.
SeeAlso|Example
Signature
object.ZOffset
objectAecViewBlockTheobjectthispropertyappliesto.
ZOffsetDouble;read-writeTheoffsetintheZdirectionoftheviewblockwithinthemulti-viewblock.
Page 521
ZoomPropertySpecifiesthefocallengthofthecamera,inmillimeters.
SeeAlso|Example
Signature
object.Zoom
objectAecCameraTheobjectthispropertyappliesto.
ZoomDouble;read-writeLengthofthelensinmillimeters.
Remarks
The LENSLENGTHsystemvariablewillberesettotheZoomvaluewhenthecamerageneratesaview.
Page 522
ZPositionFromPropertySpecifiesthepositiononthecurvefromwhichtheZDistancetoananchoredobjectismeasured.
SeeAlso|Example
Signature
object.ZPositionFrom
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
ZPositionFromAecCurveHeightPositionenum;read-writeThepositiononthecurvefromwhichZDistanceismeasured.
Page 523
ZPositionToPropertySpecifiesthepositionontheanchoredobjecttomeasureZDistanceto.
SeeAlso|Example
Signature
object.ZPositionTo
objectAecAnchorEntToCurveTheobjectthispropertyappliesto.
ZPositionToAecHeightenum;read-writeThepositionthatZDistancemeasuresto.
Page 524
ZRotationPropertySpecifiestherotationoftheanchoredobjectaroundtheZaxis.
SeeAlso|Example
Signature
object.ZRotation
objectAecAnchorEntToLayoutCell,AecAnchorEntToLayoutNode,AecAnchorEntToLayoutVolume,AecAnchorEntToCurve,AecAnchorLeadEntToNodeTheobjectthispropertyappliesto.
ZRotationDouble;read-writeRotationoftheanchoredobjectaroundtheZaxis.
Page 525
ZSpacingPropertySpecifiesthespacingbetweennodesalongtheZdirectionofthelayoutgrid.
SeeAlso|Example
Signature
object.ZSpacing
objectAecLayoutGrid2D,AecLayoutGrid3DTheobjectthispropertyappliesto.
ZSpacingACAD_DISTANCE;read-writeThespacingbetweennodesalongtheZdirectionofthelayoutgrid.
Page 526
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.
Page 527
EntityADrawingObjectTheobjectinthedrawingthatismodifiedcanbeanyoneofthedrawingobjects.
Remarks
Thiseventwillbetriggeredwhenevertheobjectismodified.Modificationincludeswheneverthevalueofapropertyisset,evenifthenewvalueisequaltothecurrentvalue.
WhencodinginVBA,youmustprovideaneventhandlerforallobjectsenabledfortheModifiedevent.Ifyoudonotprovideahandler,VBAmayterminateunexpectedly.
Noeventswillbefiredwhileamodaldialogisbeingdisplayed.
Page 528
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
Page 529
AutoCADobjectandlayercolors.
Value Description0 Thecolordefinedfortheobject'sblock.
1 (red)
2 (yellow)
3 (green)
4 (cyan)
5 (blue)
6 (magenta)
7 (white)
acByLayer(notvalidforLayerobject) 256 Thecolorofthelayertheobjectison.
Page 530
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
Page 531
acLnWt120 120
acLnWt140 140
acLnWt158 158
acLnWt200 200
acLnWt211 211
Page 532
Drawingunits.
AcMeasurementUnit
Name ValueacEnglish English(Imperial)units
acMetric Metricunits
AcMeasurementUnit
Page 533
Thestateoftheapplicationwindow.
AcWindowState
Name Value DescriptionacNorm 1 Normal(neitherminimizedormaximized)
acMin 2 Minimized
acMax 3 Maximized
AcWindowState
Page 534
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
Page 535
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
Page 536
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
Page 537
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
Page 538
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
Page 539
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
Page 540
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
Page 541
Positiononthecurve.
AecCurveHeightPosition
Name Value DescriptionaecCurveHeightPositionBottom 0 Bottom
aecCurveHeightPositionCenter 1 Center
aecCurveHeightPositionTop 2 Top
AecCurveHeightPosition
Page 542
Positiononthecurve.
AecCurvePosition
Name Value DescriptionaecCurvePositionStart 0 Start
aecCurvePositionMiddle 1 Middle
aecCurvePositionEnd 2 End
AecCurvePosition
Page 543
Positiononthecurve.
AecCurveWidthPosition
Name Value DescriptionaecCurveWidthPositionLeft 0 Left
aecCurveWidthPositionCenter 1 Center
aecCurveWidthPositionRight 2 Right
AecCurveWidthPosition
Page 544
Positionmeasuredto.
AecEdgePosition
Name Value DescriptionaecEdgePositionStart 0 Start
aecEdgePositionCenter 1 Center
aecEdgePositionEnd 2 End
AecEdgePosition
Page 545
Positionontheobject.
AecHeight
Name Value DescriptionaecHeightBottom 0 Bottom
aecHeightCenter 1 Center
aecHeightTop 2 Top
AecHeight
Page 546
Alignmentinrelationtobaseline.
AecInfillAlignment
Name Value DescriptionaecInfillAlignCentered 0 Centered
aecInfillAlignFrontFlush 1 Infrontofthebaseline
aecInfillAlignBackFlush 2 Inbackofthebaseline
AecInfillAlignment
Page 547
Theshapeofalayoutgrid.
AecLayoutShape
Name Value DescriptionaecLayoutShapeRectangular 0 Rectangularlayout
aecLayoutShapeRadial 1 Radiallayout
aecLayoutShapeCustom 2 Customlayout
AecLayoutShape
Page 548
Typeofnodespacingalongthecurve.
AecLayoutType
Name Value DescriptionaecLayoutTypeManualSpacing 0 Manualspacing
aecLayoutTypeAutoSpacingEven 1 Spacedevenlyalongthecurve
aecLayoutTypeAutoSpacingBay 2 Automaticspacing,determinedbythespecifieddistancebetweennodes
AecLayoutType
Page 549
Subtypeofthemasselement.
AecMassElementSubType
Name Value DescriptionaecMassElementSubTypeUnspecified -1 Unspecified
aecMassElementSubTypeProfileInternal 0 ProfileInternal
aecMassElementSubTypeProfileExternal 1 ProfileExternal
AecMassElementSubType
Page 550
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
Page 551
Typeofoperationcombiningobjects.
AecMassOperation
Name Value DescriptionaecMassOperationAdd 0 Addition
aecMassOperationSubtract 1 Subtraction
aecMassOperationIntersect 2 Intersection
AecMassOperation
Page 552
PlacementofedgesonAECPolygonvertices.
AecPolygonStyleEdgeWidthJustification
Name Value DescriptionaecPolygonEdgeWidthJustificationIn 0 Insideedge
aecPolygonEdgeWidthJustificationCenter 1 Center
aecPolygonEdgeWidthJustificationOut 2 Outsideedge
AecPolygonStyleEdgeWidthJustification
Page 553
Positionontheobject.
AecPosition
Name Value DescriptionaecPositionFront 0 Front
aecPositionCenter 1 Center
aecPositionBack 2 Back
AecPosition
Page 554
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
Page 555
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
Page 556
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
Page 557
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
Page 558
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
Page 559
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
Page 560
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
Page 561
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
Page 562
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
Page 563
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
Page 564
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."
Page 565
EndSelect
MsgBox"ThecurrentvalueforAngularAzimuthis"&Style,vbInformation,"AngularAzimuthExample"
EndSub
Page 566
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
Page 567
AngularPrecisionExampleSubExample_AngularPrecision()
'ThisexamplereturnstheAngularPrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforAngularPrecisionis"&dbPref.AngularPrecision,_
vbInformation,"AngularPrecisionExample"
EndSub
Page 568
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
Page 569
ApplyResizeExampleSubExample_ApplyResize()
'Thisexamplewilltakeamasselementanchoredtoa2DLayoutGrid,and'applyaResizeOffsettoit.
DimobjAsAcadObjectDimanchorAsAecAnchorEntToLayoutCellDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectanchoredelement"IfTypeOfobjIsAecMassElementThenDimmassAsAecMassElementSetmass=objIfTypeOfmass.GetAnchorIsAecAnchorEntToLayoutCellThenSetanchor=mass.GetAnchoranchor.ResizeOffset=-22anchor.ApplyResize=FalseEndIfEndIf
EndSub
Page 570
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
Page 571
counter=0ForEachobjInThisDrawing.ModelSpaceIfTypeOfobjIsAecSliceAndcounter<1Thencounter=counter+1Setslice=objMsgBox"SliceArea:"&slice.Area,vbInformation,"AreaExample"EndIfNextIfcounter=0ThenMsgBox"NoSliceinDrawing",vbInformation,"AreaExample"EndIf
EndSub
Page 572
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
Page 573
unit="squarecentimeters."
CaseaecUnitSquareDecimeter
unit="squaredecimeters."
CaseaecUnitSquareMeters
unit="squaremeters."
EndSelect
MsgBox"ThecurrentvalueforAreaDisplayUnitis"&unit,_
vbInformation,"AreaDisplayUnitExample"
EndSub
Page 574
AreaPrecisionExampleSubExample_AreaPrecision()
'ThisexampledisplaystheAreaPrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThecurrentvalueforAreaPrecisionis:"&dbPref.AreaPrecision,_
vbInformation,"AreaPrecisionExample"
EndSub
Page 575
AreaSuffixExampleSubExample_AreaSuffix()
'ThisexampledisplaystheAreaSuffixsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThecurrentvalueforAreaSuffixis:"&dbPref.AreaSuffix,_
vbInformation,"AreaSuffixExample"
EndSub
Page 576
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
Page 577
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
Page 578
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
Page 579
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
Page 580
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"
Page 582
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))
Page 583
MsgBox"ThecurrentvalueforBasePointNEis:"&basePointNE,_
vbInformation,"BasePointNEExample"
EndSub
Page 584
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
Page 585
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
Page 586
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
Page 587
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
Page 588
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
Page 589
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
Page 590
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
Page 591
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
Page 592
'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
Page 593
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
Page 594
ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)MsgBox"Ring1containsRing2is:"&ring1.Contains(ring2)
EndSub
Page 595
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
Page 596
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.",_
Page 597
vbInformation,"ConvertToCurrentAreaDisplayExample"
EndSub
Page 598
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,_
Page 599
vbInformation,"ConvertToCurrentVolumeDisplayExample"
EndSub
Page 600
CoordinatePrecisionExampleSubExample_CoordinatePrecision()
'ThisexamplereturnstheCoordinatePrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforCoordinatePrecisionis:"&dbPref.CoordinatePrecision,_
vbInformation,"CoordinatePrecisionExample"
EndSub
Page 601
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
Page 602
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.
Page 603
copied_profile.CopyFromprofile
msg="Copiedprofilehad"&copied_profile.Rings.count&"rings."&vbCrLfMsgBoxmsg,vbInformation,"CopyFromExample"
EndSub
Page 604
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
Page 605
SetcircleObj1Copy=retObjects(0)SetcircleObj2Copy=retObjects(1)circleObj1Copy.radius=radius1CopycircleObj1Copy.Color=acRedcircleObj2Copy.radius=radius2CopycircleObj2Copy.Color=acRedThisDrawing.Application.ZoomAllMsgBox"Circlescopied."EndSub
Page 606
CountExampleSubExample_Count()'ThisexamplewilldisplaythenumberofMultiViewBlockStylesinthecurrentdrawing.
DimdocAsAecArchBaseDocumentDimcMvBlockStylesAsAecMVBlockStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcMvBlockStyles=doc.MVBlockStylesMsgBox"NumberofMVBlockStylesinthisdrawingis:"&cMvBlockStyles.count,vbInformation,"CountExample"
EndSub
Page 607
DatabaseExampleSubExample_Database()'ThisexamplereferencestheDatabaseobjectobtainedfromthemodelspace.'WethendisplayinformationfromtheDatabaseobject.DimDatabaseAsAcadDatabase'AttachtoDatabaseobjectSetDatabase=ThisDrawing.ModelSpace.DatabaseMsgBox"WenowhaveaccesstothepropertiesandmethodsoftheDatabaseobject!"'RetrievethenumberofBlocksinthisdatabaseMsgBox"ThenumberofBlocksinthisdatabaseis:"&Database.Blocks.count
'ReleaseobjectSetDatabase=NothingMsgBox"TheDatabaseobjecthasbeenreleased!"EndSub
Page 608
DatabaseScaleExampleSubExample_DatabaseScale()
'ThisexamplereturnstheDatabaseScalesettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforDatabaseScaleis:"&dbPref.DatabaseScale,_
vbInformation,"DatabaseScaleExample"
EndSub
Page 609
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
Page 610
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
Page 611
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
Page 612
NextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"DepthExample"EndIf
EndSub
Page 613
DescriptionExampleSubExample_Description()
'ThisexamplewilldisplaythedescriptionofanAECEntity.
DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectAECObject"IfTypeOfobjIsAecGeoThenDimAecGeoAsAecGeo'AecGeoisthebaseclassforallthedrawnAECEntitiesSetAecGeo=objMsgBox"AECDescription:"&AecGeo.Description,vbInformation,"DescriptionExample"ElseMsgBox"NoAECEntityselected",vbInformation,"DescriptionExample"EndIf
EndSub
Page 614
DictionariesExampleSubExample_Dictionaries()'Thisexamplefindsthecurrentdictionarycollectionand'addsanewdictionarytothatcollection.DimdictAsAcadDictionarySetdict=ThisDrawing.Dictionaries.Add("TEST")MsgBox"Anewdictionarycalled"&dict.name&"hasbeenaddedtothedictionariescollection.",vbInformation,"DictionariesExample"EndSub
Page 615
DimStylesExampleSubExample_DimStyles()'Thisexampleaddsanewdimensionstyle.DimdimStyleAsAcadDimStyleSetdimStyle=ThisDrawing.DimStyles.Add("TEST")MsgBox"Anewdimensionstylecalled"&dimStyle.name&"hasbeenaddedtotheDimstylescollection.",vbInformation,"DimstylesExample"EndSub
Page 616
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
Page 617
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
Page 618
EdgeWidthExampleSubExample_EdgeWidth()
'ThisexamplewilldisplaytheedgewidthoftheselectedAecPolygon
DimobjAsAcadObjectDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"SelectAecPolygon"IfTypeOfobjIsAecPolygonThenDimpolygonAsAecPolygonDimpolygonStyleAsAecPolygonStyleSetpolygon=objSetpolygonStyle=polygon.StyleMsgBox"PolygonEdgeWidth="&polygonStyle.EdgeWidth,vbInformation,"EdgeWidthExample"ElseMsgBox"NoAecPolygonSelected",vbInformation,"EdgeWidthExample"EndIf
EndSub
Page 619
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
Page 620
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
Page 621
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
Page 622
ElevationPrecisionExampleSubExample_ElevationPrecision()
'ThisexamplereturnstheElevationPrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforElevationPrecisionis:"&dbPref.ElevationPrecision,_
vbInformation,"ElevationPrecisionExample"
EndSub
Page 623
EndOffsetExampleSubExample_EndOffset()
'ThisexampledisplaystheendoffsetofaselectedAECLayoutCurveObjectDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"EndOffsetis:"&layoutCurve.EndOffset,vbInformation,"EndOffsetExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"EndOffsetExample"EndIf
EndSub
Page 624
ExpandKeyExampleSubExample_ExpandKey()
'Thisexampleshowshowtoexpandalayerkeyforthecurrentlayerstandard
DimdocAsAecArchBaseDocumentDimdbPrefAsAecArchBaseDatabasePreferencesDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsAecLayerKeyStyleDimcLayerKeysAsAecLayerKeysDimlayerKeyAsAecLayerKeySetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesSetdbPref=doc.Preferences'SetsthelayerkeystyletothecurrentlayerstandardSetlayerKeyStyle=cLayerKeyStyles.Item(dbPref.LayerStandard)
MsgBox"LayerKeyWALLexpandsto:"&layerKeyStyle.ExpandKey("WALL"),_vbInformation,"ExpandExample"
EndSub
Page 625
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.
Page 626
center_at_origin=True'Exportthemasselementboundaries.massElement.ExportFreeForm"c:\temp\freeform-massElement",center_at_origin
EndSub
Page 627
FacetDeviationExampleSubExample_FacetDeviation()
'ThisexampledisplaystheFacetDeviationsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThesettingforFacetDeviationis:"&dbPref.FacetDeviation,_
vbInformation,"FacetDeviationExample"
EndSub
Page 628
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
Page 629
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
Page 630
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
Page 631
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
Page 632
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
Page 633
Setdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyle
Setcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item("FromPolyline")IfprofileStyleIsNothingThenSetprofileStyle=cprofiles.Add("FromPolyline")EndIfSetring=profile.Rings.Add
ring.FromPolylineplineObj
plineObj.deleteSetprofileStyle.profile=profile
EndSub
Page 634
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
Page 635
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
Page 636
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
Page 637
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
Page 638
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
Page 639
'ReturnthexdataforthelineDimxdataOutAsVariantDimxtypeOutAsVariantlineObj.GetXData"",xtypeOut,xdataOutEndSub
Page 640
GroupsExampleSubExample_Groups()'ThisexamplefindsthecurrentGroupscollectionand'addsanewgrouptothatcollection.DimgroupCollAsAcadGroupsSetgroupColl=ThisDrawing.Groups'Createadimensionstylenamed"TEST"incurrentdrawingDimtestGroupAsAcadGroupSettestGroup=groupColl.Add("TEST")MsgBox"Anewgroupcalled"&testGroup.name&"hasbeenaddedtotheGroupscollection.",vbInformation,"GroupsExample"EndSub
Page 641
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
Page 642
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
Page 643
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
Page 644
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
Page 645
HasExtensionDictionaryExampleSubExample_HasExtensionDictionary()'Thisexamplewilliteratethrougheachobjectinthecurrentdrawingand'determineifthatobjecthasanassociatedExtensionDictionaryDimDrawingObjectAsAcadObjectDimExtensionDictionaryResultsAsString'MakesurethisdrawingcontainsobjectsbeforewecontinueIfThisDrawing.ModelSpace.count=0ThenMsgBox"Therearenoobjectsinthecurrentdrawing."ExitSubEndIfForEachDrawingObjectInThisDrawing.ModelSpace'DetermineifobjectcontainsExtensionDictionarySelectCaseDrawingObject.HasExtensionDictionaryCaseTrueExtensionDictionaryResults=ExtensionDictionaryResults&DrawingObject.ObjectName&"hasanassociatedExtensionDictionary"&vbCrLfCaseFalseExtensionDictionaryResults=ExtensionDictionaryResults&DrawingObject.ObjectName&"doesnothaveanassociatedExtensionDictionary"&vbCrLfEndSelectNextMsgBoxExtensionDictionaryResultsEndSub
Page 646
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
Page 647
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
Page 649
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
Page 650
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
Page 651
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
Page 652
NextMsgBox"Thecirclehas"&Hyperlinks.count&"Hyperlink:"&vbCrLf&HLListEndSub
Page 653
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
Page 654
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"
Page 655
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
Page 656
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"
Page 657
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
Page 658
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
Page 659
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
Page 660
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
Page 661
SetviewBlocks=blockRef.viewBlocksMsgBox"IndexofViewBlock1:"&viewBlocks.Item(0).Index,vbInformation,"IndexExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"IndexExample"EndIf
EndSub
Page 662
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
Page 663
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
Page 664
ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)
profile1.Intersectprofile2
SetprofileStyle.profile=profile1
EndSub
Page 665
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
Page 667
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.
Page 668
msg=msg&vbCrLf&"Thelayerkeystylesinthisdrawingare:"&vbCrLfFori=0To(layerkeystyles.Count-1)msg=msg&""&layerkeystyles.Item(i).Name&vbCrLfNextMsgBoxmsg,vbInformation,"ItemExample"
EndSub
Page 669
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
Page 670
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.
Page 671
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
Page 672
LayerFileExampleSubExample_LayerFile()
'ThisexampledisplaystheLayerFilesettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
DimlayerfileAsString
layerfile=dbPref.LayerFile
'Testiflayerfileisset
Iflayerfile=""Then
layerfile="notset"
EndIf
MsgBox"ThecurrentvalueforLayerFileis:"&layerfile,vbInformation,"LayerFileExample"
EndSub
Page 673
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
Page 674
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
Page 675
LayerKeyStylesExampleSubExample_LayerKeyStyles()
'ThisexamplewilldisplaythenumberofLayerKeyStylesinthecurrentdrawing.
DimdocAsAecArchBaseDocumentDimcLayerKeyStylesAsAecLayerKeyStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcLayerKeyStyles=doc.LayerKeyStylesMsgBox"NumberofLayerKeyStylesinthisdrawingis:"&cLayerKeyStyles.Count,vbInformation,"LayerKeyStylesExample"
EndSub
Page 676
LayersExampleSubExample_Layers()'ThisexamplefindsthecurrentLayerscollectionand'addsanewlayertothatcollection.DimlayerCollAsAcadLayersSetlayerColl=ThisDrawing.Layers'Createadimensionstylenamed"TEST"incurrentdrawingDimtestlayerAsAcadLayerSettestlayer=layerColl.Add("TEST")MsgBox"Anewlayercalled"&testlayer.name&"hasbeenaddedtotheLayerscollection.",vbInformation,"LayersExample"EndSub
Page 677
LayerStandardExampleSubExample_LayerStandard()
'ThisexampledisplaystheLayerStandardsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
DimlaystandardAsString
laystandard=dbPref.layerstandard
'Testiflayerstandardisset
Iflaystandard=""Then
laystandard="notset"
EndIf
MsgBox"ThecurrentvalueforLayerStandardis:"&laystandard,_
vbInformation,"LayerStandardExample"
EndSub
Page 678
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
Page 679
DimlayoutCurveAsAecLayoutCurveDimnodesAsAecLayoutCurveNodesThisDrawing.Utility.GetEntityobj,pt,"SelectaLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objSetnodes=layoutCurve.nodesMsgBox"Coloris:"&nodes.layoutCurve.Color,vbInformation,"LayoutCurveExample"ElseMsgBox"NotaLayoutCurve",vbExclamation,"LayoutCurveExample"EndIf
EndSub
Page 680
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
Page 681
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
Page 682
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
Page 683
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
Page 684
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
Page 685
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"
Page 686
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
Page 687
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
Page 688
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
Page 689
Setnodes=grid.ZNodesMsgBox"OwnerGridDepthis:"&nodes.LayoutGrid3D.Depth,vbInformation,"LayoutGrid3DExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"LayoutGrid3DExample"EndIf
EndSub
Page 690
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
Page 691
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
Page 692
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
Page 693
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"
Page 694
EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"LeftOffsetExample"EndIf
EndSub
Page 695
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
Page 696
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"
Page 697
EndSelect
MsgBox"ThecurrentvalueforLinearDisplayFormatis:"&linearformat,vbInformation,"LinearDisplayFormatExample"
EndSub
Page 698
LinearPrecisionExampleSubExample_LinearPrecision()
'ThisexamplereturnstheLinearPrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforLinearPrecisionis:"&dbPref.LinearPrecision,_
vbInformation,"LinearPrecisionExample"
EndSub
Page 699
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"
Page 700
CaseaecUnitDecimeter
unit="decimeters"
CaseaecUnitMeter
unit="meters"
EndSelect
MsgBox"ThecurrentvalueforLinearUnitis:"&unit,vbInformation,"LinearUnitExample"
EndSub
Page 701
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
Page 702
LinetypesExampleSubExample_Linetypes()'Thisexamplefindsthelinetypescollectionand'listsalltheavailablelinetypesinthecollection.DimlinetypeCollAsAcadLineTypesDimentryAsAcadLineTypeDimmsgAsString'ReturnthelinetypecollectionobjectoftheactivedocumentSetlinetypeColl=ThisDrawing.Linetypes'ListallavailablelinetypesForEachentryInlinetypeCollmsg=msg&entry.name&vbCrLfNextMsgBox"Thelinetypesavailableinthisdrawingare:"&vbCrLf&msg,vbInformation,"LinetypesExample"EndSub
Page 703
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
Page 704
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
Page 705
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
Page 706
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
Page 707
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
Page 708
MaskBlockStylesExample
SubExample_MaskBlockStyles()
'ThisexamplewilldisplaythenumberofMaskBlockStylesinthecurrentdrawing.
DimdocAsAecBaseDocumentDimappAsNewAecBaseApplicationDimcMaskBlocksAsAecMaskBlockStylesapp.InitThisDrawing.ApplicationSetdoc=app.ActiveDocumentSetcMaskBlocks=doc.MaskBlockStylesMsgBox"NumberofMaskBlockStylesinthisdrawingis:"_&cMaskBlocks.Count,vbInformation,"MaskBlockStylesExample"
EndSub
Page 709
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
Page 710
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
Page 711
MassGroupsExampleSubExample_MassGroups()
'ThisexamplewilldisplaythenumberofMassGroupsinthecurrentdrawing.
DimappAsNewAecBaseApplicationDimAecdocAsAecBaseDocumentDimmassgroupsAsAecMassGroupsapp.InitThisDrawing.ApplicationSetAecdoc=app.ActiveDocumentSetAecdoc=AecArchBaseApplication.ActiveDocumentSetmassgroups=Aecdoc.massgroupsMsgBox"Thereare"&massgroups.count&"massgroupsinthisdrawing"
EndSub
Page 712
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
Page 713
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
Page 714
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
Page 715
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
Page 717
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
Page 718
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)&")"
Page 719
MsgBoxstr,,"ObjectEvent"EndSub
Page 720
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
Page 721
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
Page 722
DimviewBlocksAsAecViewBlocksThisDrawing.Utility.GetEntityobj,pt,"SelectaMultiviewBlock"IfTypeOfobjIsAecMVBlockRefThenSetblockRef=objSetviewBlocks=blockRef.viewBlocksMsgBox"ColorsofMVBlockRefOwner:"&viewBlocks.MVBlockRef.Color,vbInformation,"MVBlockRefExample"ElseMsgBox"NotaMultiviewBlock",vbInformation,"MVBlockRefExample"EndIf
EndSub
Page 723
MVBlockStylesExampleSubExample_MVBlockStyles()'ThisexamplewilldisplaythenumberofMultiViewBlockStylesinthecurrentdrawing.
DimdocAsAecArchBaseDocumentDimcMvBlockStylesAsAecMVBlockStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcMvBlockStyles=doc.MVBlockStylesMsgBox"NumberofMVBlockStylesinthisdrawingis:"&cMvBlockStyles.Count,vbInformation,"MVBlockStylesExample"
EndSub
Page 724
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
Page 725
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
Page 726
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
Page 727
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
Page 728
NodesExampleSubExample_Nodes()
'ThisexampledisplaysthenumberofnodesonthelayoutcurveDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"Numberofnodesis:"&layoutCurve.nodes.Count,vbInformation,"NodesExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"NodesExample"EndIf
EndSub
Page 729
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
Page 730
NorthRotationExampleSubExample_NorthRotation()
'ThisexamplereturnstheNorthRotationsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.Preferences
MsgBox"ThecurrentvalueforNorthRotationis:"&dbPref.NorthRotation,_
vbInformation,"NorthRotationExample"
EndSub
Page 731
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
Page 732
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
Page 733
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
Page 734
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
Page 735
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
Page 736
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
Page 737
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
Page 738
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
Page 739
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
Page 740
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
Page 741
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
Page 742
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
Page 743
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
Page 744
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
Page 745
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
Page 746
Ifcount=0ThenMsgBox"NoMassElementGroupsPresentinDrawing",vbInformation,"OperationExample"EndIf
EndSub
Page 747
OverridesEnabledExampleSubExample_OverridesEnabled()
DimdbAsNewAecBaseDatabaseDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsaeclayerkeystyleMsgBox"LayerOverridesEnabled:"&layerKeyStyle.OverridesEnabled,vbInformation,"OverridesEnabledExample"
EndSub
Page 748
OverrideSettingsExampleSubExample_OverrideSettings()
DimdbAsNewAecBaseDatabaseDimcLayerKeyStylesAsAecLayerKeyStylesDimlayerKeyStyleAsaeclayerkeystyleDimoverrideSettingsAsAecLayerOverrideSettingsdb.InitThisDrawing.DatabaseSetcLayerKeyStyles=db.LayerKeyStylesSetlayerKeyStyle=cLayerKeyStyles.Item(0)SetoverrideSettings=layerKeyStyle.overrideSettings
EndSub
Page 749
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
Page 750
PaperSpaceExampleSubExample_PaperSpace()'Thisexamplesetsthevariablepspacetothepaperspaceentitycollection.DimpspaceAsAcadPaperSpaceSetpspace=ThisDrawing.PaperSpaceEndSub
Page 751
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
Page 752
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
Page 753
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
Page 754
PolygonStylesExampleSubExample_PolygonStyles()
'ThisexamplewilldisplaythenumberofPolygonStylesinthecurrentdrawing.
DimdocAsAecArchBaseDocumentDimcPolygonStylesAsAecPolygonStylesSetdoc=AecArchBaseApplication.ActiveDocument
SetcPolygonStyles=doc.PolygonStyles
MsgBox"NumberofPolygonStylesinthisdrawingis:"&cPolygonStyles.Count,vbInformation,"PolygonStylesExample"
EndSub
Page 755
PreferencesExampleSubExample_Preferences()'ThisexamplereturnstheElevationPrecisionsettingforthecurrentdrawing.DimdbPrefAsAecDatabasePreferencesSetdbPref=AecArchBaseApplication.ActiveDocument.PreferencesMsgBox"ThecurrentvalueforElevationPrecisionis:"&dbPref.ElevationPrecision,_vbInformation,"ElevationPrecisionExample"
EndSub
Page 756
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"
Page 757
EndSub
SubExample_Profile_AecRings()
'ThisexamplewilldisplaytheareaoftheprofilethatownstheringcollectionDimdbAsNewAecBaseDatabaseDimpStyleAsAecProfileStyledb.InitThisDrawing.DatabaseSetpStyle=db.ProfileStyles.Item(0)MsgBox"RingsProfileArea:"&pStyle.Profile.rings.Profile.Area,vbInformation,"ProfileExample"
EndSub
Page 758
ProfileStyleExampleSubExample_ProfileStyle()
DimentAsObjectDimptAsVariantDimmassAsAecMassElement
ThisDrawing.Utility.GetEntityent,pt,"SelectAECMassElement"IfTypeOfentIsAecMassElementThenSetmass=entMsgBox"ProfileStyleis:"&mass.ProfileStyle.Name,vbInformation,"ProfileStyleExample"ElseMsgBox"NotanAecMassElement",vbExclamation,"ProfileStyleExample"EndIf
EndSub
Page 759
ProfileStyleNameExampleSubExample_ProfileStyleName()
'Thisexampleshowstheprofilestylenameforthemasselement
DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Nameis:"&mass.ProfileStyleName,vbInformation,"ProfileStyleNameExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"ProfileStyleNameExample"EndIf
EndSub
Page 760
ProfileStylesExampleSubExample_ProfileStyles()
'ThisexamplewilldisplaythenumberofProfileStylesinthecurrentdrawing.
DimdocAsAecArchBaseDocumentDimcProfileStylesAsAecProfileStylesSetdoc=AecArchBaseApplication.ActiveDocumentSetcProfileStyles=doc.ProfileStylesMsgBox"NumberofProfileStylesinthisdrawingis:"&cProfileStyles.Count,vbInformation,"ProfileStylesExample"
EndSub
Page 761
ProjectNameExampleSubExample_ProjectName()
'ThisexampledisplaystheProjectNamesettingforthecurrentdrawing
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThesettingforProjectNameis:"&dbPref.ProjectName,_
vbInformation,"ProjectNameExample"
EndSub
Page 762
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
Page 763
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
Page 764
RegisteredApplicationsExampleSubExample_RegisteredApplications()'ThisexamplefindsthecurrentRegisteredApplicationscollectionand'addsanewRegisteredApplicationtothatcollection.DimRegAppCollAsAcadRegisteredApplicationsSetRegAppColl=ThisDrawing.RegisteredApplications'CreateaRegisteredAppnamed"TEST"inthecurrentdrawingDimRegAppObjAsAcadRegisteredApplicationSetRegAppObj=RegAppColl.Add("TEST")MsgBox"Anewregisteredapplicationcalled"&RegAppObj.name&"hasbeenaddedtotheRegisteredApplicationscollection.",vbInformation,"RegisteredApplicationsExample"EndSub
Page 765
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
Page 766
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")
Page 767
msg=msg&"butI'vesinceremovedthestyle..."MsgBoxmsg,vbInformation,"RemoveExample"
EndSub
Page 768
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
Page 769
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
Page 770
ResizeOffsetExampleSubExample_ResizeOffset()
'Thisexamplewilltakeamasselementanchoredtoa2DLayoutGrid,and'applyaResizeOffsettoit.
DimobjAsAcadObjectDimanchorAsAecAnchorEntToLayoutCellDimptAsVariantThisDrawing.Utility.GetEntityobj,pt,"Selectanchoredelement"IfTypeOfobjIsAecMassElementThenDimmassAsAecMassElementSetmass=objIfTypeOfmass.GetAnchorIsAecAnchorEntToLayoutCellThenSetanchor=mass.GetAnchoranchor.ResizeOffset=-22anchor.ApplyResize=FalseEndIfEndIf
EndSub
Page 771
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"
Page 772
EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"RightOffsetExample"EndIf
EndSub
Page 773
RingsExampleSubExample_Rings()
'ThisexampleshowsthenumberofringsoftheprofileofanAecPolygon
DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileRings:"&poly.Profile.rings.Count,vbInformation,"RingsExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"RingsExample"EndIf
EndSub
Page 774
RiseExampleSubExample_Rise()
'Thisexampleshowstheriseofthemasselementifgableshape
DimobjectAsObjectDimmassAsAecMassElementDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecMassElementThencount=count+1Setmass=objectMsgBox"MassElement"&count&"Riseis:"&mass.Rise,vbInformation,"RiseExample"EndIfNextIfcount=0ThenMsgBox"NoMassElementsPresentinDrawing",vbInformation,"RiseExample"EndIf
EndSub
Page 775
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
Page 776
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)
Page 777
axisLine.UpdateMsgBox"Rotatethebox30degreesabouttheaxisshown.",,"Rotate3DExample"
'RotatetheboxboxObj.Rotate3DrotatePt1,rotatePt2,rotateAngleThisDrawing.RegenTrueMsgBox"Theboxisrotated30degrees.",,"Rotate3DExample"EndSub
Page 778
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
Page 779
SaveAsDefaultExampleSubExample_SaveAsDefault()
'ThisexamplesetstheTextHeightsettingto0.25
'andsavesitasthedefault.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
dbPref.TextHeight=0.25
dbPref.SaveAsDefault
MsgBox"ThenewdefaultvalueforTextHeightis:"&dbPref.TextHeight,_
vbInformation,"SaveAsDefaultExample"
EndSub
Page 780
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
Page 781
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
Page 782
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"
Page 783
IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleXis:"&mvBlock.ScaleX,vbInformation,"ScaleXExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleXExample"EndIf
EndSub
Page 784
ScaleXYExampleSubExample_ScaleXY()
DimringAsAecRingDimprofileAsAecProfile
DimdocAsAecArchBaseDocumentSetdoc=AecArchBaseApplication.ActiveDocumentDimcprofilesAsAecProfileStylesDimprofileStyleAsAecProfileStyleSetcprofiles=doc.ProfileStylesSetprofileStyle=cprofiles.Item(0)
SetprofileStyle.profile=profile.ScaleXY(2,1)
EndSub
Page 785
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"
Page 786
IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleYis:"&mvBlock.ScaleY,vbInformation,"ScaleYExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleYExample"EndIf
EndSub
Page 787
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"
Page 788
IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entMsgBox"ScaleZis:"&mvBlock.ScaleZ,vbInformation,"ScaleZExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"ScaleZExample"EndIf
EndSub
Page 789
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
Page 790
SelfIntersectsExampleSubExample_SelfIntersects()
'ThisexampleshowsifanAecPolygonselfintersects
DimobjAsObjectDimptAsVariantDimpolyAsAecPolygonThisDrawing.Utility.GetEntityobj,pt,"SelectanAECPolygon"IfTypeOfobjIsAecPolygonThenSetpoly=objMsgBox"ProfileSelfIntersects?:"&poly.Profile.SelfIntersects,vbInformation,"SelfIntersectsExample"ElseMsgBox"NotaPolygonornoProfileFound",vbInformation,"SelfIntersectsExample"EndIf
EndSub
Page 791
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
Page 792
'ReturnthexdataforthelineDimxdataOutAsVariantDimxtypeOutAsVariantlineObj.GetXData"",xtypeOut,xdataOutEndSub
Page 793
Side1ExampleSubExample_Side1()
'Thisexampleshowsthelengthofcutplanealongthestartingedge
DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Side1is:"&clip.Side1,vbInformation,"Side1Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Side1Example"EndIf
EndSub
Page 794
Side2ExampleSubExample_Side2()
'Thisexampleshowsthelengthofcutplanealongtheendingedge
DimobjectAsObjectDimclipAsAecClipVolDimcountAsInteger'initalizecount=0ForEachobjectInThisDrawing.ModelSpaceIfTypeOfobjectIsAecClipVolThencount=count+1Setclip=objectMsgBox"ClipVol"&count&"Side2is:"&clip.Side2,vbInformation,"Side2Example"EndIfNextIfcount=0ThenMsgBox"NoClipVolPresentinDrawing",vbInformation,"Side2Example"EndIf
EndSub
Page 795
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
Page 796
StartOffsetExampleSubExample_StartOffset()
'ThisexampledisplaysthestartoffsetofaselectedAECLayoutCurveobjectDimobjAsObjectDimptAsVariantDimlayoutCurveAsAecLayoutCurveThisDrawing.Utility.GetEntityobj,pt,"SelectaNodeonanAECLayoutCurve"IfTypeOfobjIsAecLayoutCurveThenSetlayoutCurve=objMsgBox"StartOffsetis:"&layoutCurve.StartOffset,vbInformation,"StartOffsetExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"StartOffsetExample"EndIf
EndSub
Page 797
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
Page 798
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
Page 799
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
Page 800
ring1.FromPoints(pointList1)ring2.FromPoints(pointList2)
profile1.Subtractprofile2
SetprofileStyle.profile=profile1
EndSub
Page 801
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
Page 802
TextHeightExampleSubExample_TextHeight()
'ThisexampledisplaystheTextHeightsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThecurrentvalueforTextHeightis:"&dbPref.TextHeight,_
vbInformation,"TextHeightExample"
EndSub
Page 803
TextStylesExampleSubExample_TextStyles()'ThisexamplefindsthecurrentTextstylescollectionand'addsanewTextstyletothatcollection.DimTextCollAsAcadTextStylesSetTextColl=ThisDrawing.TextStyles'CreateaTextstylenamed"TEST"inthecurrentdrawingDimtextStyleAsAcadTextStyleSettextStyle=TextColl.Add("TEST")MsgBox"AnewTextstylecalled"&textStyle.name&"hasbeenaddedtotheTextstylescollection.",vbInformation,"TextstylesExample"EndSub
Page 804
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
Page 805
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
Page 806
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
Page 807
'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
Page 808
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
Page 809
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"
Page 810
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
Page 811
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
Page 812
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
Page 813
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
Page 814
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
Page 815
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
Page 816
Setring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingValid?:"&ring.Valid,vbInformation,"ValidExample"
EndSub
Page 817
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
Page 818
SelectCaselayoutCurve.TypeCaseaecLayoutTypeAutoSpacingBaystr="Bayspacing="&layoutCurve.ValueCaseaecLayoutTypeAutoSpacingEvenstr="Numberofevenspaces="&layoutCurve.ValueCaseaecLayoutTypeManualSpacingstr="ManualSpacing"EndSelect
MsgBoxstr,vbInformation,"ValueExample"ElseMsgBox"NotaAECLayoutCurve",vbExclamation,"ValueExample"EndIf
EndSub
Page 819
VerticalScaleExampleSubExample_VerticalScale()
'Thisexamplewilldisplaytheverticalscaleofthedatabase.
DimdbAsNewAecArchBaseDatabaseDimprefAsAecArchBaseDatabasePreferencesdb.InitThisDrawing.DatabaseSetpref=db.PreferencesMsgBox"VerticalScaleofthedatabase:"&pref.VerticalScale,vbInformation,_
"VerticalScaleExample"
EndSub
Page 820
ViewBlocksExampleSubExample_ViewBlocks()
DimentAsAcadEntityDimptAsVariantDimmvBlockAsAecMVBlockRefDimcViewBlocksAsAecViewBlocks
ThisDrawing.Utility.GetEntityent,pt,"SelectAECMulti-ViewBlock"IfTypeOfentIsAecMVBlockRefThenSetmvBlock=entSetcViewBlocks=mvBlock.viewBlocksMsgBox"NumberofViewblocksis:"&cViewBlocks.Count,vbInformation,"StyleNameExample"ElseMsgBox"NotanAecMVBlockRef",vbExclamation,"StyleNameExample"EndIf
EndSub
Page 821
ViewportsExampleSubViewports()'ThisexamplefindsthecurrentViewportscollectionand'addsanewviewporttothatcollection.DimviewportCollAsAcadViewportsSetviewportColl=ThisDrawing.Viewports'Createaviewportnamed"TEST"inthecurrentdrawingDimviewportObjAsAcadViewportSetviewportObj=viewportColl.Add("TEST")MsgBox"Anewviewportcalled"&viewportObj.name&"hasbeenaddedtotheViewportscollection.",vbInformation,"ViewportsExample"EndSub
Page 822
ViewsExampleSubExample_Views()'Thisexamplefindsthecurrentviewscollectionand'addsanewviewtothatcollection.DimviewCollAsAcadViewsSetviewColl=ThisDrawing.Views'Createaviewnamed"TEST"inthecurrentdrawingDimviewObjAsAcadViewSetviewObj=viewColl.Add("TEST")MsgBox"Anewviewcalled"&viewObj.name&"hasbeenaddedtotheviewscollection.",vbInformation,"ViewsExample"EndSub
Page 823
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
Page 824
polygon.Update
EndSub
Page 825
VoidExampleSubExample_Void()
'ThisexamplewilldisplaytheiftheringisvoidornotDimdbAsNewAecBaseDatabaseDimringAsAecRingdb.InitThisDrawing.DatabaseSetring=db.ProfileStyles.Item(0).Profile.rings.Item(0)MsgBox"RingVoid?:"&ring.Void,vbInformation,"VoidExample"
EndSub
Page 826
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
Page 827
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"
Page 828
CaseaecUnitCubicDecimeter
unit="cubicdecimeters"
CaseaecUnitCubicMeter
unit="cubicmeters"
EndSelect
MsgBox"ThecurrentvalueforVolumeDisplayUnitis"&unit,_
vbInformation,"VolumeDisplayUnitExample"
EndSub
Page 829
VolumePrecisionExampleSubExample_VolumePrecision()
'ThisexampledisplaystheVolumePrecisionsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThecurrentvalueforVolumePrecisionis:"&dbPref.VolumePrecision,_
vbInformation,"VolumePrecisionExample"
EndSub
Page 830
VolumeSuffixExampleSubExample_VolumeSuffix()
'ThisexampledisplaystheVolumeSuffixsettingforthecurrentdrawing.
DimdbPrefAsAecArchBaseDatabasePreferences
SetdbPref=AecArchBaseApplication.ActiveDocument.preferences
MsgBox"ThecurrentvalueforVolumeSuffixis"&dbPref.VolumeSuffix,_
vbInformation,"VolumeSuffixExample"
EndSub
Page 831
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
Page 832
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
Page 833
WindowStateExampleSubExample_WindowState()'ThisexamplereadsanddisplaysthecurrentwindowstateoftheAutoCADapplication.
DimCurrentStateAsString'Usethe"WindowState"variabletodeterminethewindowstateofAutoCADSelectCaseWindowStateCaseacMin:CurrentState="Minimized"CaseacMax:CurrentState="Maximized"CaseacNorm:CurrentState="NormalSize"EndSelect
'DisplaywindowstateMsgBox"Theapplicationwindowisnow:"&CurrentStateEndSub
Page 834
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
Page 835
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
Page 836
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
Page 837
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXEndOffsetis:"&grid.XEndOffset,vbInformation,"XEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XEndOffsetExample"EndIf
EndSub
Page 838
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
Page 839
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXNodesis:"&grid.XNodes.Count,vbInformation,"XNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XNodesExample"EndIf
EndSub
Page 840
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
Page 841
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
Page 842
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
Page 843
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
Page 844
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
Page 845
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
Page 846
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
Page 847
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXStartOffsetis:"&grid.XStartOffset,vbInformation,"XStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XStartOffsetExample"EndIf
EndSub
Page 848
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
Page 849
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
Page 850
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
Page 851
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridXValueis:"&grid.XValue,vbInformation,"XValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"XValueExample"EndIf
EndSub
Page 852
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
Page 853
SelectCaseanchor.YAlignmentCaseaecInfillAlignCenteredalignment="Centered."CaseaecInfillAlignFrontFlushalignment="Infrontofthebaseline."CaseaecInfillAlignBackFlushalignment="Inbackofthebaseline."CaseElsealignment="Unknown"EndSelectMsgBox"YAlignmentofobject:"&alignment,vbInformation,"YAlignmentExample"EndIfElseMsgBox"ObjectselectedisnotanAECentity.",vbInformation,"YAlignmentExample"EndIf
EndSub
Page 854
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
Page 855
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
Page 856
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYEndOffsetis:"&grid.YEndOffset,vbInformation,"YEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YEndOffsetExample"EndIf
EndSub
Page 857
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
Page 858
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYNodesis:"&grid.YNodes.Count,vbInformation,"YNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YNodesExample"EndIf
EndSub
Page 859
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
Page 860
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
Page 861
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
Page 862
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
Page 863
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
Page 864
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYStartOffsetis:"&grid.YStartOffset,vbInformation,"YStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YStartOffsetExample"EndIf
EndSub
Page 865
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
Page 866
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
Page 867
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
Page 868
ThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridYValueis:"&grid.YValue,vbInformation,"YValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"YValueExample"EndIf
EndSub
Page 869
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
Page 870
ZEndOffsetExampleSubExample_ZEndOffset()
'ThisexampledisplaystheZendoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZEndOffsetis:"&grid.ZEndOffset,vbInformation,"ZEndOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZEndOffsetExample"EndIf
EndSub
Page 871
ZNodesExampleSubExample_ZNodes()
'ThisexampledisplaysthenumberofZnodesfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZNodesis:"&grid.ZNodes.Count,vbInformation,"ZNodesExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZNodesExample"EndIf
EndSub
Page 872
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
Page 873
ZoomExampleSubExample_Zoom()
'ThisexampledisplaysthezoomofaselectedAecCameraobjectDimobjAsObjectDimptAsVariantDimcameraAsAecCameraThisDrawing.Utility.GetEntityobj,pt,"SelectaCamera"IfTypeOfobjIsAecCameraThenSetcamera=objMsgBox"Zoomis:"&camera.Zoom,vbInformation,"ZoomExample"ElseMsgBox"NotaCamera",vbExclamation,"ZoomExample"EndIf
EndSub
Page 874
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
Page 875
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
Page 876
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
Page 877
ZStartOffsetExampleSubExample_ZStartOffset()
'ThisexampledisplaystheZstartoffsetfora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZStartOffsetis:"&grid.ZStartOffset,vbInformation,"ZStartOffsetExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZStartOffsetExample"EndIf
EndSub
Page 878
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
Page 879
ZValueExampleSubExample_ZValue()
'ThisexampledisplaystheZvaluefora3DlayoutgridDimobjAsObjectDimptAsVariantDimgridAsAecLayoutGrid3DThisDrawing.Utility.GetEntityobj,pt,"Selecta3DLayoutGrid"IfTypeOfobjIsAecLayoutGrid3DThenSetgrid=objMsgBox"GridZValueis:"&grid.ZValue,vbInformation,"ZValueExample"ElseMsgBox"Nota3DLayoutGrid",vbExclamation,"ZValueExample"EndIf
EndSub
Page 880
ForceHorizontalPropertySpecifieswhetherthetagisalignedwiththeobjectororientedhorizontally.
SeeAlso|Example
Signature
object.ForceHorizontal
objectAecAnchorExtendedTagToEntTheobjectthispropertyappliesto.
ForceHorizontalBoolean;read-writeTRUE:Orientthetaghorizontally.FALSE:Alignthetagwiththeobject.
Page 881
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.
Page 882
ActiveConfigurationPropertyReturnstheactivedisplayconfigurationforthespecifiedviewport.
SeeAlso|Example
Signature
RetVal=object.ActiveConfiguration(ViewPort)
objectAecDisplayConfigurationsTheobjectthispropertyappliesto.
ViewPortAcadObject;input-onlyTheAcadViewportorAcadPViewportthatthedisplayconfigurationappliesto.
RetValAecDisplayConfigurationTheactivedisplayconfigurationforthespecifiedviewport.
Page 883
AddOverrideMethodAddsanobjectorstyleoverrideonthedisplayrepresentation.
SeeAlso|Example
Signature
RetVal=object.AddOverride(AecObject)
ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.
AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.
RetValAecDisplayPropertiesTheoverridedisplaypropertiesforthedisplayrepresentation.
Remarks
Thismethodwillfailifanoverrideisalreadyattached.
Page 884
DeleteOverrideMethodDeletesanexistingoverridefromthedisplayrepresentation.
SeeAlso|Example
Signature
object.DeleteOverrideAecObject
ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.
AecObjectAecObject;input-onlyAnobjectinstanceorstyleoverride.
Remarks
Thismethodwillfailifthereisnoexistingoverridetoremove.
Page 885
DuplicateMethodCreatesaduplicatedisplayrepresentation.
SeeAlso|Example
Signature
RetVal=object.DuplicateUniqueName
ObjectAecDisplayRepresentationTheobjectorobjectsthismethodappliesto.
UniqueNameString;input-onlyTheuniquenameforthenewdisplayrepresentation.
RetValAecDisplayRepresentationTheduplicateddisplayrepresentation.
Remarks
Thismethodwillfailifthenameisnotunique.
Page 886
SeeAlso
MethodsandProperties:
ImportFreeFormmethod
Page 887
SeeAlso
MethodsandProperties:
ExportFreeFormmethod
Page 888
Collections
AecLayerKeys
AecLayerKeyStyles
AecLayerOverrideSettings
AecLayoutCurveNodes
AecLayoutGrid2DNodes
AecLayoutGrid2DXNodes
AecLayoutGrid2DYNodes
AecLayoutGrid3DNodes
AecLayoutGrid3DXNodes
AecLayoutGrid3DYNodes
AecLayoutGrid3DZNodes
AecLayoutNodes
AecMaskBlockStyles
AecMassElementStyles
AecMassGroups
AecMVBlockStyles
Page 889
AecMVBlockStyles
AecPolygonStyles
AecProfileStyles
AecRings
AecViewBlocks
Page 890
ACAD_ANGLEdatatypeACAD_ANGLEisaDOUBLEwhoseunitsarebasedontheAUNITSsystemvariable,andwhoseprecisionisbasedontheAUPRECsystemvariable.
Page 891
SeeAlso:
MethodsandProperties:
AngleToStringmethod
AutoCADActiveXandVBADeveloper'sGuide:
CalculatingPointsandValues
Page 892
SeeAlso:
MethodsandProperties:
AngleToStringmethod
AutoCADActiveXandVBADeveloper'sGuide:
CalculatingPointsandValues
Page 893
SeeAlso:
MethodsandProperties:
AngleToStringmethod
AutoCADActiveXandVBADeveloper'sGuide:
CalculatingPointsandValues
Page 894
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
Page 895
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
Page 896
Thehatchtypeusedbyadisplaycomponent.
AecHatchType
Name Value DescriptionaecHatchTypeUserDefined 0 UserDefined
aecHatchTypePreDefined 1 PreDefined
aecHatchTypeCustomDefined 2 CustomDefined
aecHatchTypeSolidFill 3 SolidFill
AecHatchType
Page 897
Thesurfacehatchplacement.
AecSurfaceHatchPlacement
Name Value DescriptionaecSurfaceHatchPlacementTop 1 Top
aecSurfaceHatchPlacementBottom 2 Bottom
aecSurfaceHatchPlacementLeft 3 Left
aecSurfaceHatchPlacementRight 4 Right
aecSurfaceHatchPlacementFront 5 Front
aecSurfaceHatchPlacementBack 6 Back
AecSurfaceHatchPlacement
Page 898
Thesurfacemappingtype.
AecSurfaceMappingType
Name Value DescriptionaecSurfaceMappingTypeDefaultMapping 0 DefaultMapping
aecSurfaceMappingTypeFaceMapping 1 FaceMapping
aecSurfaceMappingTypeAsSurfaceHatch 2 AsSurfaceHatch
AecSurfaceMappingType
Page 899
ACAD_DISTANCEdatatypeACAD_DISTANCEisaDOUBLEwhoseunitsarebasedontheLUNITSsystemvariable,andwhoseprecisionisbasedontheLUPRECsystemvariable.