Add Method

Creates a member object and adds it to the appropriate collection.

See Also | Example

Signatures: Overview

Blocks 

RetVal = object.Add(InsertionPoint, Name) 

UCSs 

RetVal = object.Add(Origin, XAxisPoint, YAxisPoint, Name) 

Hyperlinks 

RetVal = object.Add(Name[, Description][, NamedLocation]) 

PlotConfigurations 

RetVal = object.Add(Name[, ModelType]) 

Dictionaries,

DimStyles, Documents,
Groups; Layers,
Layouts, Linetypes,
Materials,
PlotConfigurations,
PopupMenus, Projects,
RegisteredApplications,
SelectionSets,
TextStyles, Toolbars,
Views, Viewports 

RetVal = object.Add(Name) 

Signatures: Detail

RetVal = object.Add(InsertionPoint, Name)

Object

Blocks
The collection to add the new object to.

InsertionPoint

Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying where the Blocks Collection object will be added.

Name

String; input-only
The name of the block to add to the collection.

RetVal

Block object
The newly added Block object.


RetVal = object.Add(Origin, XAxisPoint, YAxisPoint, Name)

Object

UCSs
The collection to add the new object to.

Origin

Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying where the UCS is to be added.

XAxisPoint

Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying a point on the positive X axis of the UCS. The XAxisPoint and YAxisPoint together cannot specify the same location as the Origin.

YAxisPoint

Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying a point on the positive Y axis of the UCS.
(The Z axis follows by applying the right-hand rule.)

Name

String; input-only
The name of the UCS to add to the collection.

RetVal

UCS object
The newly added UCS object.


RetVal = object.Add(Name[, Description][, NamedLocation])

Object

Hyperlinks
The collection to add the new object to.

Name

String; input-only
The name of the hyperlink to add.

Description

Variant; input-only; optional
The description of the hyperlink to add.

NamedLocation

Variant; input-only; optional
A given location, such as a named view in AutoCAD or a bookmark in a word processing program. If you specify a named view to jump to in an AutoCAD drawing, AutoCAD restores that view when the hyperlink is opened.

RetVal

Hyperlink
The newly added object.


RetVal = object.Add(Name[, ModelType])

Object

PlotConfigurations
The collection to add the new object to.

Name

String; input-only
The name of the object to add to the collection.

ModelType

Boolean; input-only; optional
TRUE: The plot configuration applies only to the Model tab.
FALSE: The plot configuration applies to all layouts.

RetVal

PlotConfiguration
The newly added object.


RetVal = object.Add(Name)

Object

Dictionaries, DimStyles, Documents, Groups; Layers, Layouts, Linetypes, PopupMenus, RegisteredApplications, SelectionSets, TextStyles, Toolbars, Views, Viewports
The collection to add the new object to.

Name

String; input-only; optional for the Documents collection.
The name of the object to add to the collection. For the Documents collection, this name represents the name of the drawing template to use and will accept a URL address or a fully qualified path and file name.

RetVal

Dictionary, DimStyle, Document, Group, Layer, Layout, Linetype, PopupMenu, RegisteredApp, SelectionSet, TextStyle, Toolbar, View, Viewport
The newly added object.

Remarks

Although you can create a linetype and add it to the Linetypes Collection object using this method, it will be created with the default properties only. Because you cannot edit properties of the Linetype object with this release of ActiveX Automation, use the Load method to load existing linetypes into your drawing.

Layers are created with default color and linetype properties. The default color is white, and the default linetype is standard.

Documents collection: When accessing a secure URL, a dialog box will be posted that prompts the user for the necessary password information. Message boxes may also be displayed if the user has not suppressed this activity in the browser. When downloading a file, AutoCAD creates a temporary file for internal processing. Do not attempt to access this temporary file. Information in this file is deleted at the end of the AutoCAD session.

Group object: You should not specify a Name that is excessively long or contains spaces, because these names are not handled well in the Group dialog box and cannot be entered at the command line.

 

   Comments?