Connectivity Automation Objects

CAO objects, methods, and properties
Connectivity Automation Objects
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Connectivity Automation Objects (CAO) support the following dbConnect features:

  • Event Notifications
  • Key Descriptions
  • Key Values
  • Label Templates
  • Labels
  • Link Templates
  • Links
  • Queries

You can also create dbConnect objects.

Beginning with AutoCAD 2002, CAO supports the following objects, methods, and properties:

  • Objects and methods: CAO objects include the LabelTemplates collection, LabelTemplate object, Label object, Queries collection, and Query object, along with their corresponding methods. The KeyDescriptions and KeyValues collections are independent objects. KeyDescriptions no longer derives from the LinkTemplate object, and KeyValues no longer derives from the Link object. The KeyValues Add method accepts two arguments: field name and value, rather than a single object argument.Properties: The KeyDescription Type property is now a CAO data type, rather than an OLEDB data type.Event notifications: The DbConnect object uses event notifications.

You can find sample code demonstrating the use of CAO in the AutoCAD sample\Database Connectivity\CAO directory.

Topics in this section

  • CAO objects, methods, and properties
  • Migrate projects
Please send us your comment about this page


CAO objects, methods, and properties

Connectivity Automation Objects
Connectivity Automation Objects
Migrate projects
CAO objects, methods, and properties
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Beginning with AutoCAD 2002, the following objects, methods and properties are supported by Connectivity Automation Objects (CAO).

CAO objects and their methods and properties introduced in AutoCAD 2002
Object | Methods | Properties
Label object | Hide, Refresh, Reload, Show | DbConnect, DisplayValues, Document, LabelTemplate, LeaderObjectId, Link, MTextObjectId
LabelTemplate | Hide, Refresh, Reload, Show | Catalog, Color, DataSource, DbConnect, DisplayableAttributes, Document, Format, LeaderAttachment, LeaderOffset, Linetype, Name, Rotation, Schema, Table, TextAttachment, TextHeight, TextStyle, TipOffset
LabelTemplates collection | Add, Delete, Item | Count, DbConnect, Document
Queries collection | Add, Delete, Item | Count, DbConnect, Document
Query object | None | Catalog, DataSource, DbConnect, Document, Name, Schema, Table, Text
Existing objects and their methods and properties introduced in AutoCAD 2002
Object | New Methods | New Properties
DbConnect object | Connect, GetLabelTemplates, GetLinksByKeyGetLinksByLabelTemplate, GetLinksBySQLCond, GetQueries, IsConnected | None
KeyDescriptions collection | Add | None
Link | None | Label
Links collection | Intersect, Subtract, Union | None
LinkTemplate | CreateLabel | None
LinkTemplates collection | Add, Delete | None


Migrate projects

CAO objects, methods, and properties
Connectivity Automation Objects
Objects
Migrate projects
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Automation projects created with the AutoCAD 2009 VBA IDE, or earlier, or Visual Basic 6 will have to be recompiled to work with AutoCAD 2010.

AutoCAD 2010 automation projects use the type library acax18enu.tlb. The type library is located in the following folder: C:\Program Files\Common Files\Autodesk Shared.

AutoCAD 2010 automation projects use the AutoCAD.Application.18 ProgID for the CreateObject, GetObject, and GetInterfaceObject methods. For example, if you are using the CreateObject function in an AutoCAD 2010 automation project, you use CreateObject ("AutoCAD.Application.18"). If an automation project uses version-independent ProgIDs, change the project to use version-dependent ProgIDs.


Object Model [Connectivity Automation Reference: CAR]

 KeyValueObj KeyValuesColl KeyDescriptionObj KeyDescriptionsColl DbConnectObj Hotspot 10 LabelObj LinkObj LinksColl QueryObj QueriesColl LabelTemplateObj LabelTemplatesColl LinkTemplateObj LinkTemplatesColl


Objects

Migrate projects
DbConnect object
Objects
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Topics in this section

  • DbConnect object
  • KeyDescription object
  • KeyDescriptions collection
  • KeyValue object
  • KeyValues collection
  • Label object
  • LabelTemplate object
  • LabelTemplates collection
  • Link object
  • Links collection
  • LinkTemplate object
  • LinkTemplates collection
  • Queries collection
  • Query object


DbConnect object

Objects
Objects
KeyDescription object
DbConnect object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

An instance of the AutoCAD DbConnect object.

VBA class name: DbConnect

Create using: For VB and AutoCAD VBA:

AutoCAD.GetInterfaceObject("CAO.DbConnect.18")

Access via: N/A

Methods

Connect

Disconnect

GetLabelTemplates

GetLinks

GetLinksByKey

GetLinksBySQLCond

GetLinksByLabelTemplate

GetLinkTemplates

GetQueries

IsConnected

ReloadLabels

Properties

Version

DataSourceLocation

Events

OnConnect

OnDisconnect

OnLabelTemplateCreated

OnLabelTemplateDeleted

OnLabelTemplateModified

OnLinkTemplateCreated

OnLinkTemplateDeleted

OnLinkTemplateModified

OnQueryCreated

OnQueryDeleted

OnQueryModified


KeyDescription object

DbConnect object
Objects
KeyDescriptions collection
KeyDescription object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Defines a key field for a link template object.

VBA class name: KeyDescription

Create using: KeyDescriptions.Add

Access via: LinkTemplate.KeyDescriptions.Item

Key fields are used by a link template to uniquely identify a record from a database table.

To edit or query a KeyDescription, use the following methods and properties:

Methods

None

Properties

DefinedSize

FieldName

NumericScale

Precision

Type


KeyDescriptions collection

KeyDescription object
Objects
KeyValue object
KeyDescriptions collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Defines a set of key fields in a link template.

VBA class name: KeyDescriptions

Create using: ACADApplication.GetInterfaceObject("CAO.KeyDescriptions.18")

Access via: LinkTemplate.KeyDescriptions

To select a specific KeyDescription, use the Item method. To edit or query the KeyDescriptions collection, use the following methods and properties:

Methods

Add

Item

Properties

Count


KeyValue object

KeyDescriptions collection
Objects
KeyValues collection
KeyValue object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies a single key value in a link.

VBA class name: KeyValue

Create using: KeyValues.Add

Access via: Link.KeyValues.Item

To edit or query a KeyValue, use the following methods and properties:

Methods

None

Properties

FieldName

Value


KeyValues collection

KeyValue object
Objects
Label object
KeyValues collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

A set of key values in a link.

VBA class name: KeyValues

Create using: ACADApplication.GetInterfaceObject("CAO.KeyValues.18")

Access via: Link.KeyValues

To add a new member to the collection, use the Add method. To select a specific KeyValue, use the Item method. To edit or query the KeyValues collection, use the following methods and properties:

Methods

Add

Item

Properties

Count


Label object

KeyValues collection
Objects
LabelTemplate object
Label object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

A multiline text object that displays data in an AutoCAD drawing from selected fields in an external database table.

VBA class name: Label

Create using: LinkTemplate.CreateLabel

Access via: Link.Label

A Label object can be obtained from a Link object if the link type is either an attached label or a freestanding label. You cannot update the properties of a label object.

To delete a label, delete its associated link. To edit or query a label, use the following methods and properties:

Methods

Hide

Refresh

Reload

Show

Properties

DbConnect

DisplayValues

Document

LabelTemplate

LeaderObjectId

Link

MTextObjectId


LabelTemplate object

Label object
Objects
LabelTemplates collection
LabelTemplate object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Defines what fields from the database table are displayed in the label, and how the label text is formatted.

VBA class name: LabelTemplate

Create using: LabelTemplates.Add

Access via: LabelTemplates.Item

A label template can be updated only if there are no links associated with it.

Label templates have database properties and graphical properties. Database properties correspond to table column references. Graphical properties control the appearance of label text in the drawing area. To update data retrieved from a database, use the Reload method. To update label text, use the Refresh method.

To create a label template, use the Add method of the LinkTemplates collection. To edit or query a label template, use the following methods and properties:

Methods

Hide

Refresh

Reload

Show

Properties

Catalog

Color

Datasource

DbConnect

DisplayableAttributes

Document

Format

LeaderAttachment

LeaderOffset

Linetype

Name

Rotation

Schema

Table

TextAttachment

TextHeight

TextStyle

TipOffset


LabelTemplates collection

LabelTemplate object
Objects
Link object
LabelTemplates collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

The collection of label templates from an AutoCAD drawing.

VBA class name: LabelTemplates

Create using: N/A

Access via: DbConnect.GetLabelTemplates

To add a new member to the collection, use the Add method. To select a specific label template, use the Item method. To edit or query the LabelTemplates collection, use the following methods and properties:

Methods

Add

Delete

Item

Properties

Count

DbConnect

Document


Link object

LabelTemplates collection
Objects
Links collection
Link object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

A link between a database table record and an AutoCAD graphical object.

VBA class name: Link

Create using: LinkTemplate.CreateLink

Access via: Links.Item

A link establishes a dynamic relationship between an AutoCAD graphical object and an external database table. In order to create links, you must first create a link template that specifies the database table and key fields used by all links based on that template. There are three types of AutoCAD links:

  • Entity links associate link information with an AutoCAD graphical object.
  • Attached labels associate link information with an AutoCAD graphical object and create a corresponding multiline text label object.
  • Freestanding labels associate link information with an multiline text label object.

To create an entity link, use the CreateLink method of the LinkTemplate object. To create labels, use the CreateLabel method of the LinkTemplate object. To edit or query a link, use the following methods and properties:

Methods

Delete

Properties

DbConnect

Document

KeyValues

Label

LinkTemplate

LinkType

ObjectId

Updatable


Links collection

Link object
Objects
LinkTemplate object
Links collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

A collection of links and labels from an AutoCAD drawing.

VBA class name: Links

Create using: N/A

Access via: DbConnect.GetLinks

To add a new member to the collection, use the CreateLink method of the LinkTemplate object object. To select a specific Link, use the Item method. To edit or query the Links collection, use the following methods and properties:

Methods

Intersect

Item

Subtract

Union

Properties

Count

DbConnect

Document


LinkTemplate object

Links collection
Objects
LinkTemplates collection
LinkTemplate object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the external database table and key fields that are used by links based on this template.

VBA class name: LinkTemplate

Create using: LinkTemplates.Add

Access via: LinkTemplates.Item

Link templates are used to establish relationships between AutoCAD graphical objects and a particular database table. Link templates specify the table and key fields that are used by all links based on that template.

To edit or query a link template, use the following methods and properties:

Methods

CreateLabel

CreateLink

Properties

Catalog

DataSource

DbConnect

Document

KeyDescriptions

Name

Schema

Table


LinkTemplates collection

LinkTemplate object
Objects
Queries collection
LinkTemplates collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

The collection of link templates from an AutoCAD drawing.

VBA class name: LinkTemplates

Create using: N/A

Access via: DbConnect.GetLinkTemplates

To select a specific LinkTemplate, use the Item method. To edit or query the LinkTemplates collection, use the following methods and properties:

Methods

Add

Delete

Item

Properties

Count

DbConnect

Document


Queries collection

LinkTemplates collection
Objects
Query object
Queries collection
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

The collection of queries from an AutoCAD drawing.

VBA class name: Queries

Create using: N/A

Access via: DbConnect.GetQueries

To add a new member to the collection, use the Add method. To select a specific query, use the Item method. To edit or examine the Queries collection, use the following methods and properties:

Methods

Add

Delete

Item

Properties

Count

DbConnect

Document


Query object

Queries collection
Objects
Methods
Query object
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

A stored database query.

VBA class name: Query

Create using: Queries.Add

Access via: Queries.Item

To create a query, use the Add method of the Queries collection. To edit or examine a query, use the following properties:

Methods

None

Properties

Catalog

Datasource

DbConnect

Document

Name

Schema

Table

Text


Methods

Query object
Add
Methods
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Topics in this section

  • Add
  • Clear
  • Connect
  • CreateLabel
  • CreateLink
  • Delete
  • Disconnect
  • GetLabelTemplates
  • GetLinks
  • GetLinksByKey
  • GetLinksByLabelTemplate
  • GetLinksBySQLCond
  • GetLinkTemplates
  • GetQueries
  • Hide
  • Intersect
  • IsConnected
  • Item
  • Refresh
  • Reload
  • ReloadLabels
  • Show
  • Subtract
  • Union


Add

Methods
Methods
Clear
Add
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Adds a new object to the specified collection.

RetVal = object.Add(Name, DataType [, Precision] [, Scale])

Object

KeyDescriptions collection

The object or objects this method applies to.

Name

String; input-only

The name of the column to be added.

DataType

CaoDataType enum; input-only

The data type of the column being added. Specify one of the following constants:

  • kCaoTypeText
  • kCaoTypeNumeric
  • kCaoTypeInteger
  • kCaoTypeDouble
  • kCaoTypeDate
  • kCaoTypeTime
  • kCaoTypeTimestamp
  • kCaoTypeBit
  • kCaoTypeBlob

Precision

Integer; input-only; optional

The meaning of Precision depends on the DataType specified, as follows:

kCaoTypeNumeric: Precision of numeric data.kCaoTypeText: Length of data in symbols.kCaoTypeBlob: Length of data in bits.

Precision is ignored for all other data types.

Scale

Integer; input-only; optional

Numeric scale for kCaoTypeNumeric. Ignored for all other data types.

RetVal

KeyDescription object

The newly added object.

RetVal = object.Add(FieldName, Value)

Object

KeyValue object

The object or objects this method applies to.

FieldName

String; input-only

The name of the field to be added.

Value

Variant; input-only

The value of the field being added.

RetVal

KeyValue object

The newly added object.

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, DisplayAttributes)

Object

LabelTemplates collection

The object or objects this method applies to.

DataSource

String; input-only

Data source name.

Catalog

String; input-only

Catalog name.

Schema

String; input-only

Schema name.

Table

String; input-only

Table name.

Name

String; input-only

Label template name.

DisplayAttributes

Variant (String or array of strings); input-only

Column names to be displayed as label or format strings. Where a single string is specified, CAO assumes the string is a format string. An array of strings is interpreted as a list of column names.

Format strings are compatible with MTEXT format strings. Refer to database table columns in format strings using the following syntax:

  • #(<column name>)

For example:

  • #(name)

Column names are converted to the following format string:

  • #(<column name 1>\P#(<column name 2>)

RetVal

LabelTemplate object

The newly added object.

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, KeyDescriptions)

Object

LabelTemplates collection

The object or objects this method applies to.

DataSource

String; input-only

Data source name.

Catalog

String; input-only

Catalog name.

Schema

String; input-only

Schema name.

Table

String; input-only

Table name.

Name

String; input-only

Link template name.

KeyDescriptions

KeyDescriptions collection; input-only

Key descriptions for the link template.

RetVal

LinkTemplate object

The newly added object.

RetVal = object.Add(DataSource, Catalog, Schema, Table, Name, SQLText)

Object

Queries collection

The object or objects this method applies to.

DataSource

String; input-only

Data source name.

Catalog

String; input-only

Catalog name.

Schema

String; input-only

Schema name.

Table

String; input-only

Table name.

Name

String; input-only

Link template name.

SQLText

String; input-only

The SQL statement.

RetVal

Query object

The newly added object.

See Also
    • Delete


Clear

Add
Methods
Connect
Clear
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Empties the specified collection.

Signature

object.Clear()

Object

KeyValues collection

The object or objects this method applies to.

Remarks

This method is obsolete and is being maintained for backward-compatibility.


Connect

Clear
Methods
CreateLabel
Connect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Connects to a data source.

Signature

object.Connect(Datasource [, Username] [, Password] [, Prompt])

Object

DbConnect

The object or objects this method applies to.

Datasource

String; input-only

The name of a .udl file in the Data Links directory.

Username

String; input-only; optional

User name with which you are connecting.

Password

String; input-only; optional

Password for connecting.

Prompt

Boolean; input-only; optional

Specifies whether users are prompted to specify connection properties.

TRUE: Prompts users to specify required connection properties, if some are missing.FALSE: Does not prompt users to specify connection properties.

Remarks

If the data source is already connected, nothing happens.

See Also
    • Disconnect
    • DataSource
    • DataSourceLocation


CreateLabel

Connect
Methods
CreateLink
CreateLabel
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Creates an attached or freestanding label.

Signature

RetVal = object.CreateLabel(Arg1, KeyValues, LabelTemplate [, DisplayValues])

Object

LinkTemplate object

The object or objects this method applies to.

Arg1

Long for object ID, or Variant (three-element array of Doubles); input-only

The graphical object to attach the label to, or the insertion point for a freestanding label.

KeyValues

KeyValues collection; input-only

The key field values for the label.

LabelTemplate

LabelTemplate object, or String naming a label template; input-only

The label template for the label object.

DisplayValues

Variant (array of Variants); input-only; optional

Values to be displayed in the label if no matching key field is found in the database table.

RetVal

The new label object.

Remarks

The values displayed in the created label depend on which arguments are passed to CreateLabel. Those values may be affected by a subsequent call to the Reload method. CreateLabel behaves as follows:

  • If a DisplayValues argument is supplied, the argument values are displayed in the label.
  • If DisplayValues is not specified, CAO attempts to retrieve a linked row from the database. If successful, values from the row are displayed in the label. If a linked row cannot be obtained (for example, no connection exists or key values have no match in the database), an error occurs.
  • If a DisplayValues argument is supplied, but you follow CreateLabel with a call to the Reload method, CAO attempts to retrieve a linked row from the database. If successful, database values are displayed in the label; if a linked row cannot be obtained, an error occurs.
See Also
    • CreateLink


CreateLink

CreateLabel
Methods
Delete
CreateLink
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Creates a link to an AutoCAD entity.

Signature

RetVal = object.CreateLink(ObjectID, KeyValues)

Object

LinkTemplate object

The object or objects this method applies to.

ObjectID

Long; input-only

The entity ID of the object to link to.

KeyValues

KeyValues collection; input-only

The key field values for the link.

RetVal

The new link object.

See Also
    • CreateLabel


Delete

CreateLink
Methods
Disconnect
Delete
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Deletes a specified object.

Signature

object.Delete(Index)

Object

LabelTemplates collection,

Link object,

LinkTemplates Collection,

Queries collection

The object or objects this method applies to.

Index

Variant; input-only

The index location in the collection. The index must be either an integer or a string. If an integer, the index must be between 0 and N-1, where N is the number of objects in the collection or selection set.

Remarks

When you delete an object in a collection, all remaining items in the collection are reassigned a new index based on the current count.

See Also
    • Add
    • Count


Disconnect

Delete
Methods
GetLabelTemplates
Disconnect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Disconnects from a data source.

Signature

object.Disconnect(Datasource)

Object

DbConnect

The object or objects this method applies to.

Datasource

String; input-only

The name of a .udl file in the Data Links directory.

See Also
    • Connect


GetLabelTemplates

Disconnect
Methods
GetLinks
GetLabelTemplates
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a LabelTemplates collection from an AutoCAD document.

Signature

RetVal = object.GetLabelTemplates([Document])

Object

DbConnect

The object or objects this method applies to.

Document

AcadDocument; input-only, optional

The AutoCAD document from which to obtain the label templates collection. If no value is specified, the collection is obtained from the active document.

RetVal

LabelTemplates collection

The label templates collection.

See Also
    • GetLinksByLabelTemplate


GetLinks

GetLabelTemplates
Methods
GetLinksByKey
GetLinks
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a Links collection.

Signature

RetVal = object.GetLinks([LinkTemplate] [, ObjectIDs] [, LinkTypes] [, Document])

Object

DbConnect

The object or objects this method applies to.

LinkTemplate

LinkTemplate object, or a string identifying a link template; input-only; optional

If specified, indicates the link template whose links are returned.

ObjectIDs

Variant (array of Longs); input-only; optional

If specified, each long is the object ID of an AutoCAD entity whose links are to be returned.

LinkTypes

Integer; input-only; optional

Specifies the type of links to return. You can specify any combination of the following link types:

  • kFSLabelType: Freestanding labels
  • kAttachedLabelType: Attached labels

If no value is specified, all label links are returned.

Document

Document object; input-only; optional

This argument is ignored if a LabelTemplate object is passed as the first argument. If this argument is not specified, the document object is identified as follows:

  • If the LabelTemplate argument is a string naming a label template, the current document is used.
  • If the LabelTemplate argument is a LabelTemplate object, the label template document is used.

RetVal

Links collection

The Links collection for the specified link template.

Remarks

If no arguments are specified, GetLinks returns all entity links associated with the current document.

See Also
    • GetLinkTemplates
    • GetLinksByKey
    • GetLinksByLabelTemplate
    • GetLinksBySQLCond


GetLinksByKey

GetLinks
Methods
GetLinksByLabelTemplate
GetLinksByKey
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a Links collection based on link template, link key values, and (optionally) link type.

Signature

RetVal = object.GetLinksByKey(LinkTemplate, KeyValues [, LinkTypes] [, Document])

Object

DbConnect

The object or objects this method applies to.

LinkTemplate

LinkTemplate object, or a string identifying a link template; input-only

Specifies the link template whose links are returned.

KeyValues

KeyValues collection; input-only

The KeyValues collection containing the key values to search for.

LinkTypes

Integer; input-only; optional

Specifies the type of links to return. You can specify any combination of the following link types:

  • kFSLabelType: Freestanding labels
  • kAttachedLabelType: Attached labels

If no value is specified, all label links are returned.

Document

Document object; input-only; optional

This argument is ignored if a LabelTemplate object is passed as the first argument. If this argument is not specified, the document object is identified as follows:

  • If the LabelTemplate argument is a string naming a label template, the current document is used.
  • If the LabelTemplate argument is a LabelTemplate object, the label template document is used.

RetVal

Links collection

The Links collection for the specified keys.

See Also
    • GetLinkTemplates
    • GetLinks
    • GetLinksByLabelTemplate
    • GetLinksBySQLCond


GetLinksByLabelTemplate

GetLinksByKey
Methods
GetLinksBySQLCond
GetLinksByLabelTemplate
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a Links collection containing the label links associated with the specified label template.

Signature

RetVal = object.GetLinksByLabelTemplate(LabelTemplate, [, LinkTypes] [, Document])

Object

DbConnect

The object or objects this method applies to.

LabelTemplate

LabelTemplate object, or a string identifying a label template; input-only

Specifies the label template whose links are returned.

LinkTypes

Integer; input-only; optional

Specifies the type of links to return. You can specify any combination of the following link types:

  • kFSLabelType: Freestanding labels
  • kAttachedLabelType: Attached labels

If no value is specified, all label links are returned.

Document

Document object; input-only; optional

This argument is ignored if a LabelTemplate object is passed as the first argument. If this argument is not specified, the document object is identified as follows:

  • If the LabelTemplate argument is a string naming a label template, the current document is used.
  • If the LabelTemplate argument is a LabelTemplate object, the label template document is used.

RetVal

Links collection

The Links collection meeting the specified conditions.

See Also
    • GetLabelTemplates
    • GetLinks
    • GetLinksByKey
    • GetLinksBySQLCond


GetLinksBySQLCond

GetLinksByLabelTemplate
Methods
GetLinkTemplates
GetLinksBySQLCond
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a Links collection based on link template, SQL condition, and (optionally) link type.

Signature

RetVal = object.GetLinksBySQLCond(LinkTemplate, Condition [, LinkTypes] [, Document])

Object

DbConnect

The object or objects this method applies to.

LinkTemplate

LinkTemplate object, or a string identifying a link template; input-only

Specifies the link template whose links are returned.

Condition

String; input-only

The WHERE clause of the SQL statement, identifying the conditions to be met.

LinkTypes

Integer; input-only; optional

Specifies the type of links to return. You can specify any combination of the following link types:

  • kEntityLinkType: Entity links
  • kFSLabelType: Freestanding labels
  • kAttachedLabelType: Attached labels

If no value is specified, only entity links are returned.

Document

Document object; input-only; optional

This argument is ignored if a LinkTemplate object is passed as the first argument. If this argument is not specified, the document object is identified as follows:

  • If the LinkTemplate argument is a string naming a link template, the current document is used.
  • If the LinkTemplate argument is a LinkTemplate object, the link template document is used.

RetVal

Links collection

The Links collection meeting the specified conditions.

Remarks

You must connect to the data source identified by LinkTemplate before issuing GetLinksBySQLCond.

The SQL conditions are applied to every linked row in the database, and the corresponding link object is returned if the conditions are met.

See Also
    • GetLinkTemplates
    • GetLinks
    • GetLinksByKey
    • GetLinksByLabelTemplate


GetLinkTemplates

GetLinksBySQLCond
Methods
GetQueries
GetLinkTemplates
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the LinkTemplates collection from an AutoCAD document.

Signature

RetVal = object.GetLinkTemplates([Document])

Object

DbConnect

The object or objects this method applies to.

Document

AcadDocument; input-only; optional

The AutoCAD document to get the link templates collection from. If no value is specified, gets the collection from the active document.

RetVal

LinkTemplates collection;

The link templates collection.

See Also
    • GetLinks
    • GetLabelTemplates


GetQueries

GetLinkTemplates
Methods
Hide
GetQueries
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets a Queries collection from an AutoCAD document.

Signature

RetVal = object.GetQueries([Document])

Object

DbConnect

The object or objects this method applies to.

Document

AcadDocument; input-only, optional

The AutoCAD document from which to obtain the Queries collection. If no value is specified, the collection is obtained from the active document.

RetVal

Queries collection

The queries collection.

See Also
    • No related topics.


Hide

GetQueries
Methods
Intersect
Hide
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Makes the specified objects invisible in the AutoCAD drawing.

Signature

object.Hide()

Object

LabelTemplate object,

Label

The object or objects this method applies to.

See Also
    • Show


Intersect

Hide
Methods
IsConnected
Intersect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Returns the set of Link objects that are members of each of the specified Links collections.

Signature

Retval = object.Intersect(LinkSelection)

Object

Links collection

The current object or objects this method applies to.

LinkSelection

Links collection

The Links collection with which to intersect the current object.

RetVal

Links collection

The Link objects that were found in both of the specified Links collections.

Remarks

Intersect returns only those Links that appear in both of the specified collections.

See Also
    • Subtract
    • Union


IsConnected

Intersect
Methods
Item
IsConnected
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates whether a connection to a data source exists.

Signature

RetVal = object.IsConnected(DataSource)

Object

DbConnect

The object or objects this method applies to.

DataSource

String; input-only

The name of a UDL file in the Data Links directory.

RetVal

Boolean

Identifies whether or not a connection to a data source exists.

  • TRUE: A connection to the data source exists.
  • FALSE: No connection exists.
See Also
    • Connect
    • Disconnect
    • DbConnect


Item

IsConnected
Methods
Refresh
Item
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the member object at a given index from a collection.

Signature

RetVal = object.Item(Index)

Object

LinkTemplates Collection,

KeyDescriptions collection,

KeyValues collection,

Links collection,

Queries collection

The object or objects this method applies to.

Index

Variant; input-only

The index location in the collection for the member item to query. The index must be either an integer or a string. If an integer, the index must be between 0 and N-1, where N is the number of objects in the collection or selection set.

RetVal

The object at the given index location in the specified collection.

See Also
    • Count


Refresh

Item
Methods
Reload
Refresh
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Refreshes the display of labels in the drawing area.

Signature

object.Refresh()

Object

LabelTemplate object,

Label

The object or objects this method applies to.

Remarks

Refresh does not affect label values, only their appearance (for example, text height and color). Use Reload to update label values from their data source.

Refresh does not require a connection to the data source.

Specifying a LabelTemplate object causes all labels associated with that label template to be refreshed.

See Also
    • Reload


Reload

Refresh
Methods
ReloadLabels
Reload
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Reloads from the database any objects you specify that are connected to their data source.

Signature

object.Reload()

Object

LabelTemplate object,

Label

The object or objects this method applies to.

Remarks

Specifying a LabelTemplate object causes all labels associated with that label template to be reloaded.

Reloading does not affect label attributes such as text height or color. Use Refresh to update label attributes in the drawing area.

See Also
    • Refresh


ReloadLabels

Reload
Methods
Show
ReloadLabels
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Reloads the labels in the specified AutoCAD drawing.

Signature

object.ReloadLabels([ObjectIDs] [, Document])

Object

DbConnect

The object or objects this method applies to.

ObjectIDs

Variant; input-only; optional

Array of longs. Each long specifies an AutoCAD entity object ID. If not specified, reloads all labels in the specified document.

Document

AcadDocument; input-only; optional

The AutoCAD document to reload the labels in. If not specified, reloads the labels in the active document.

See Also
    • No related topics.


Show

ReloadLabels
Methods
Subtract
Show
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Makes the specified objects visible in the AutoCAD drawing.

Signature

object.Show()

Object

LabelTemplate object,

Label object

The object or objects this method applies to.

See Also
    • Hide


Subtract

Show
Methods
Union
Subtract
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Returns the set of Link objects resulting from the subtraction of one Links collection from another.

Signature

Retval = object.Subtract(LinkSelection)

Object

Links collection

The current object or objects this method applies to.

LinkSelection

Links collection

The Links collection to subtract from the current object.

RetVal

Links collection

The Link objects remaining after subtracting LinkSelection from Object.

Remarks

The resulting collection contains all members of the current object that do not appear in the LinkSelection collection.

See Also
    • Intersect
    • Union


Union

Subtract
Methods
Properties
Union
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Returns the set of Link objects that are members of either of the specified Links collections.

Signature

Retval = object.Union(LinkSelection)

Object

Links collection

The current object or objects this method applies to.

LinkSelection

Links collection

The Links collection to merge with the current object.

RetVal

Links collection

The Link objects that were found in either of the specified Links collections.

Remarks

Union adds the members of both Links collections and returns the result. Links that appear in both collections are included only once in the resulting collection.

See Also
    • Intersect
    • Subtract


Properties

Union
Catalog
Properties
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Topics in this section

  • Catalog
  • Color
  • Count
  • DataSource
  • DataSourceLocation
  • DbConnect
  • DefinedSize
  • DisplayableAttributes
  • DisplayValues
  • Document
  • FieldName
  • Format
  • KeyDescriptions
  • KeyValues
  • Label
  • LabelTemplate
  • LeaderAttachment
  • LeaderObjectId
  • LeaderOffset
  • Linetype
  • Link
  • LinkTemplate
  • LinkType
  • MTextObjectId
  • Name
  • NumericScale
  • ObjectId
  • Precision
  • Rotation
  • Schema
  • Table
  • Text
  • TextAttachment
  • TextHeight
  • TextStyle
  • TipOffset
  • Type
  • Updatable
  • Value
  • Version


Catalog

Properties
Properties
Color
Catalog
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the catalog name value.

Signature

object.Catalog

object

LabelTemplate object,

LinkTemplate object,

Query object

The object or objects this property applies to.

Catalog

String

The name of the table catalog.

See Also
    • DataSource
    • Schema
    • Table


Color

Catalog
Properties
Count
Color
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the color of label text.

Signature

object.Color

object

LabelTemplate object

The object or objects this property applies to.

Color

acColor enum

Indicates the label text color. The value returned is a color index number from 0 to 256. When setting Color, you can specify one of the constants listed here:

  • acRed (1)
  • acYellow (2)
  • acGreen (3)
  • acCyan (4)
  • acBlue (5)
  • acMagenta (6)
  • acWhite (7)


Count

Color
Properties
DataSource
Count
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the number of objects in the specified collection.

Signature

object.Count

object

KeyDescriptions collection,

KeyValues collection,

LabelTemplates Collection,

Links collection,

LinkTemplates Collection,

Queries collection

The object or objects this property applies to.

Count

Long; read-only

The number of objects in the collection.

See Also
    • Item


DataSource

Count
Properties
DataSourceLocation
DataSource
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the data source name value.

Signature

object.DataSource

object

LabelTemplate object,

LinkTemplate object,

Query object

The object or objects this property applies to.

DataSource

String

Specifies the name of the data source.

See Also
    • DatasourceLocation property
    • Catalog
    • Schema
    • Table


DataSourceLocation

DataSource
Properties
DbConnect
DataSourceLocation
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the default storage location of data source configuration files.

Signature

object.DataSourceLocation

object

DbConnect object

The object or objects this property applies to.

DataSourceLocation

String; read-only

Specifies the path of data source configuration files.

See Also
    • DataSource


DbConnect

DataSourceLocation
Properties
DefinedSize
DbConnect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the DbConnect object.

Signature

object.DbConnect

object

LabelTemplate object,

LabelTemplates collection,

Link object,

Links collection,

LinkTemplate object,

LinkTemplates Collection,

Queries collection,

Query object

The object or objects this property applies to.

DbConnect

Object; read-only

The DbConnect object object.

See Also
    • Connect
    • Disconnect


DefinedSize

DbConnect
Properties
DisplayableAttributes
DefinedSize
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the maximum field width of the specified object.

Signature

object.DefinedSize

object

KeyDescription object

The object or objects this property applies to.

DefinedSize

Long

The maximum field width allowed for the KeyDescription object.

See Also
    • FieldName


DisplayableAttributes

DefinedSize
Properties
DisplayValues
DisplayableAttributes
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the database table columns to be displayed in labels.

Signature

object.DisplayableAttributes

object

LabelTemplate object

The object or objects this property applies to.

DisplayableAttributes

Variant (array of Strings); read-only

Indicates the table columns to be displayed in labels based on the specified LabelTemplate object.

Remarks

Displayable attributes can be set using theFormat property of the LabelTemplate object.

See Also
    • Format


DisplayValues

DisplayableAttributes
Properties
Document
DisplayValues
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Contains the label values derived from data in an external database table that you want displayed.

Signature

object.DisplayValues

object

Label object

The object or objects this property applies to.

DisplayValues

Variant (array of Variants); read-only

The label values obtained from the database table.

See Also
    • CreateLabel


Document

DisplayValues
Properties
FieldName
Document
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the AcadDocument object.

Signature

object.Document

object

LabelTemplate object,

LabelTemplates collection,

Link object,

Links collection,

LinkTemplate object,

LinkTemplates Collection,

Queries collection,

Query object

The object or objects this property applies to.

Document

Object; read-only

The AcadDocument object.

See Also
    • No related topics.


FieldName

Document
Properties
Format
FieldName
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates the field name of the specified object.

Signature

object.FieldName

object

KeyDescription object, KeyValue object

The object or objects this property applies to.

FieldName

String

Specifies the field name of the object.

See Also
    • DefinedSize


Format

FieldName
Properties
KeyDescriptions
Format
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Identifies the data to appear in the label.

Signature

object.Format

object

LabelTemplate object

The object or objects this property applies to.

Format

String

Indicates the text and table columns to be displayed in labels based on the specified LabelTemplate object. Specify columns using the following notation:

  • #(<column name>)

For example:

"#(Tag_Number)\P#(Manufacturer)\P#(Equipment_Description)"

Remarks

The following example specifies a label that includes the Tag_Number and Equipment_Description columns from a database table:

object.Format = "Details are as follows : \P#(Tag_Number)\P#(Equipment_Description)"

You can use the DisplayableAttributes property of the LabelTemplate object to obtain a list of table columns associated with the label template.

See Also
    • DisplayableAttributes


KeyDescriptions

Format
Properties
KeyValues
KeyDescriptions
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the KeyDescriptions collection of the specified object.

Signature

object.KeyDescriptions

object

LinkTemplate object

The object or objects this property applies to.

KeyDescriptions

Object

The KeyDescriptions collection of the specified object.

See Also
    • KeyValues


KeyValues

KeyDescriptions
Properties
Label
KeyValues
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Returns the KeyValues collection for the specified object.

Signature

object.KeyValues

object

Link object

The object or objects this property applies to.

KeyValues

Object

The key values of the specified object.

See Also
    • KeyDescriptions


Label

KeyValues
Properties
LabelTemplate
Label
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the label associated with the link.

Signature

object.Label

object

Link object

The object or objects this property applies to.

Label

Label object; read-only

The label associated with the link.

Remarks

A Label object is returned only if the link type is either a freestanding label or an attached label.

See Also
    • Link
    • GetLinks


LabelTemplate

Label
Properties
LeaderAttachment
LabelTemplate
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the label template for the label.

Signature

object.LabelTemplate

object

Label object

The object or objects this property applies to.

LabelTemplate

LabelTemplate object; read-only

The label template on which the label is based.

See Also
    • Label
    • GetLabelTemplates


LeaderAttachment

LabelTemplate
Properties
LeaderObjectId
LeaderAttachment
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the leader attachment point for labels.

Signature

object.LeaderAttachment

object

LabelTemplate object

The object or objects this property applies to.

LeaderAttachment

AcAttachmentPoint enum

A number indicating the attachment point. Specify one of the following constants:

  • acAttachmentPointTopLeft - Top Left
  • acAttachmentPointTopCenter - Top Center
  • acAttachmentPointTopRight - Top Right
  • acAttachmentPointMiddleLeft - Middle Left
  • acAttachmentPointMiddleCenter - Middle Center
  • acAttachmentPointMiddleRight - Middle Right
  • acAttachmentPointBottomLeft - Bottom Left
  • acAttachmentPointBottomCenter - Bottom Center
  • acAttachmentPointBottomRight - Bottom Right
See Also
    • GetLabelTemplates
    • LeaderObjectId
    • LeaderOffset


LeaderObjectId

LeaderAttachment
Properties
LeaderOffset
LeaderObjectId
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the object ID of the object attached to a label leader.

Signature

object.LeaderObjectId

object

Label object

The object or objects this property applies to.

LeaderObjectId

Long; read-only

The object ID of the object attached to the leader. If the specified label object is a freestanding label, 0 is returned.

See Also
    • Label
    • LeaderAttachment
    • LeaderOffset
    • MTextObjectId


LeaderOffset

LeaderObjectId
Properties
Linetype
LeaderOffset
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the leader offset point for labels.

Signature

object.LeaderOffset

object

LabelTemplate object

The object or objects this property applies to.

LeaderOffset

Variant (array of Doubles)

The 3D WCS coordinates specifying the offset point for leaders in labels based on the specified label template.

See Also
    • GetLabelTemplates
    • LeaderAttachment
    • LeaderObjectId


Linetype

LeaderOffset
Properties
Link
Linetype
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the linetype for labels.

Signature

object.Linetype

object

LabelTemplate object

The object or objects this property applies to.

Linetype

String

The linetype for labels.

See Also
    • No related topics.


Link

Linetype
Properties
LinkTemplate
Link
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the link associated with the label.

Signature

object.Link

object

Label object

The object or objects this property applies to.

Link

Link object; read-only

The link associated with the label.

See Also
    • Label


LinkTemplate

Link
Properties
LinkType
LinkTemplate
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates the link template used by the specified object.

Signature

object.LinkTemplate

object

Link object

The object or objects this property applies to.

LinkTemplate

Object; read-only

Indicates the link template used by the specified link.

See Also
    • GetLinkTemplates


LinkType

LinkTemplate
Properties
MTextObjectId
LinkType
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates the link type of the specified object.

Signature

object.LinkType

object

Link object

The object or objects this property applies to.

LinkType

LinkType enum; read-only

Specifies whether the link is an entity link, a freestanding label, or an attached label. LinkType values are as follows:

  • 2 - Entity link
  • 4 - Freestanding label
  • 8 - Attached label
  • 1 - Unknown

Remarks

When referring to a LinkType value, you can use the following constants:

  • kEntityLinkType
  • kFSLabelType
  • kAttachedLabelType
  • kUnkownLinkType
See Also
    • Link


MTextObjectId

LinkType
Properties
Name
MTextObjectId
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Gets the object ID of the multiline text for the label.

Signature

object.MTextObjectId

object

Label object

The object or objects this property applies to.

MTextObjectId

Long; read-only

The object ID of a label's MText object.

See Also
    • LeaderObjectId


Name

MTextObjectId
Properties
NumericScale
Name
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Stores the name of the specified object.

Signature

object.Name

object

LabelTemplate object,

LinkTemplate object,

Query object

The object or objects this property applies to.

Name

String

Indicates the name of the specified object.

See Also
    • No related topics.


NumericScale

Name
Properties
ObjectId
NumericScale
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates the numeric scale of the specified object.

Signature

object.NumericScale

object

KeyDescription object

The object or objects this property applies to.

NumericScale

Integer

Specifies the number of decimal places of accuracy for the KeyDescription object.

See Also
    • Precision
    • Type


ObjectId

NumericScale
Properties
Precision
ObjectId
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Stores the object identification of the AutoCAD entity that the specified object is associated with.

Signature

object.ObjectId

object

Link object

The object or objects this property applies to.

ObjectId

Long; read-only

The object ID of the entity the specified object is associated with.

See Also
    • Link


Precision

ObjectId
Properties
Rotation
Precision
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates the numeric precision of the specified object.

Signature

object.Precision

object

KeyDescription object

The object or objects this property applies to.

Precision

Integer

Indicates the maximum number of digits allowable for a KeyDescription object.

See Also
    • NumericScale
    • Type


Rotation

Precision
Properties
Schema
Rotation
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the rotation angle for labels.

Signature

object.Rotation

object

LabelTemplate object

The object or objects this property applies to.

Rotation

Double

The rotation angle in radians.

Remarks

The rotation angle is relative to the X axis of the object's WCS, with positive angles going counterclockwise when looking down from the Z axis toward the origin.

See Also
    • No related topics.


Schema

Rotation
Properties
Table
Schema
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the schema name value.

Signature

object.Schema

object

LabelTemplate object,

LinkTemplate object,

Query object

The object or objects this property applies to.

Schema

String

The name of the database schema of the specified object.

See Also
    • Catalog
    • DataSource
    • Table


Table

Schema
Properties
Text
Table
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the table name value.

Signature

object.Table

object

LabelTemplate object,

LinkTemplate object,

Query object

The object or objects this property applies to.

Table

String

The name of the database table for the specified object.

See Also
    • Catalog
    • DataSource
    • Schema


Text

Table
Properties
TextAttachment
Text
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the SQL text of the query.

Signature

object.Text

object

Query object

The object or objects this property applies to.

Text

String

The SQL statement of the query.

See Also
    • GetQueries


TextAttachment

Text
Properties
TextHeight
TextAttachment
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the text attachment point for labels.

Signature

object.TextAttachment

object

LabelTemplate object

The object or objects this property applies to.

TextAttachment

AcAttachmentPoint enum

A number indicating the attachment point. Specify one of the following constants:

  • acAttachmentPointTopLeft- Top Left
  • acAttachmentPointTopCenter- Top Center
  • acAttachmentPointTopRight- Top Right
  • acAttachmentPointMiddleLeft- Middle Left
  • acAttachmentPointMiddleCenter- Middle Center
  • acAttachmentPointMiddleRight- Middle Right
  • acAttachmentPointBottomLeft- Bottom Left
  • acAttachmentPointBottomCenter- Bottom Center
  • acAttachmentPointBottomRight- Bottom Right
See Also
    • LabelTemplate
    • TextHeight
    • TextStyle
    • TipOffset


TextHeight

TextAttachment
Properties
TextStyle
TextHeight
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the text height for label text.

Signature

object.TextHeight

object

LabelTemplate object

The object or objects this property applies to.

TextHeight

Double

The height for label text.

See Also
    • LabelTemplate
    • TextAttachment
    • TextStyle
    • TipOffset


TextStyle

TextHeight
Properties
TipOffset
TextStyle
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the text style for label text.

Signature

object.TextStyle

object

LabelTemplate object

The object or objects this property applies to.

TextStyle

String

The name of the style used for label text.

See Also
    • LabelTemplate
    • TextAttachment
    • TextHeight
    • TipOffset


TipOffset

TextStyle
Properties
Type
TipOffset
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the tip offset for label text.

Signature

object.TipOffset

object

LabelTemplate object

The object or objects this property applies to.

TipOffset

Variant (three-element array of Doubles)

The tip offset for label text.

See Also
    • LabelTemplate
    • TextAttachment
    • TextHeight
    • TextStyle


Type

TipOffset
Properties
Updatable
Type
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Specifies the data type of the current object.

Signature

object.Type

object

KeyDescription object

The object or objects this property applies to.

Type

CaoDataType enum

The data type of the object. Can be one of the following constants:

  • kCaoTypeText
  • kCaoTypeNumeric
  • kCaoTypeInteger
  • kCaoTypeDouble
  • kCaoTypeDate
  • kCaoTypeTime
  • kCaoTypeTimestamp
  • kCaoTypeBit
  • kCaoTypeBlob
See Also
    • NumericScale
    • Precision


Updatable

Type
Properties
Value
Updatable
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Indicates whether a particular link can be updated.

Signature

object.Updatable

object

Link object

The object or objects this property applies to.

Updatable

Boolean; read-only

Specifies whether the link can be updated. If, for example, a link is on a locked layer, it cannot be updated until the layer is unlocked.

See Also
    • No related topics.


Value

Updatable
Properties
Version
Value
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Holds the value for the specified object.

Signature

object.Value

object

KeyValue object

The object or objects this property applies to.

Value

Variant

Stores the value for the KeyValue object.

See Also
    • No related topics.


Version

Value
Properties
Events
Version
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Identifies the ASE version of the DbConnect object.

Signature

object.Version

object

DbConnect object

The object or objects this property applies to.

Version

String; read-only

Indicates the version of the DbConnect object.

See Also
    • No related topics.


Events

Version
OnConnect
Events
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

OnConnect Triggered when a connection to the data source is established.

OnDisconnect Triggered when the connection to the data source is closed.

OnLabelTemplateCreated Triggered when a new LabelTemplate is saved in the drawing.

OnLabelTemplateDeleted Triggered when a LabelTemplate is deleted from the drawing.

OnLabelTemplateModified Triggered when LabelTemplate changes are saved in the drawing.

OnLinkTemplateCreated Triggered when a new LinkTemplate is saved in the drawing.

OnLinkTemplateDeleted Triggered when a LinkTemplate is deleted from the drawing.

OnLinkTemplateModified Triggered when LinkTemplate changes are saved in the drawing.

OnQueryCreated Triggered when a Query is saved in the drawing.

OnQueryDeleted Triggered when a Query is deleted from the drawing.

OnQueryModified Triggered when Query changes are saved in the drawing.

Topics in this section

  • OnConnect
  • OnDisconnect
  • OnLabelTemplateCreated
  • OnLabelTemplateDeleted
  • OnLabelTemplateModified
  • OnLinkTemplateCreated
  • OnLinkTemplateDeleted
  • OnLinkTemplateModified
  • OnQueryCreated
  • OnQueryDeleted
  • OnQueryModified


OnConnect

Events
Events
OnDisconnect
OnConnect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a connection to a data source is established.

Signature

object.OnConnect(Datasource)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Datasource

String; input to the handler

The name of the data source.

See Also
    • OnDisconnect


OnDisconnect

OnConnect
Events
OnLabelTemplateCreated
OnDisconnect
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a connection to a data source is closed.

Signature

object.OnDisconnect(Datasource)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Datasource

String; input to the handler

The name of the data source.

See Also
    • OnConnect


OnLabelTemplateCreated

OnDisconnect
Events
OnLabelTemplateDeleted
OnLabelTemplateCreated
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a new label template is saved in a drawing.

Signature

object.OnLabelTemplateCreated(Document, LabelTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document in which the label template was created.

LabelTemplateName

String; input to the handler

The name of the label template that was created.

Remarks

This event may be triggered when a drawing containing label templates is opened.

See Also
    • OnLabelTemplateModified
    • OnLabelTemplateDeleted


OnLabelTemplateDeleted

OnLabelTemplateCreated
Events
OnLabelTemplateModified
OnLabelTemplateDeleted
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a label template is deleted from a drawing.

Signature

object.OnLabelTemplateDeleted(Document, LabelTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document from which the label template was deleted.

LabelTemplateName

String; input to the handler

The name of the label template that was deleted.

See Also
    • OnLabelTemplateCreated
    • OnLabelTemplateModified


OnLabelTemplateModified

OnLabelTemplateDeleted
Events
OnLinkTemplateCreated
OnLabelTemplateModified
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when label template changes are saved in a drawing.

Signature

object.OnLabelTemplateModified(Document, LabelTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document containing the label template that was modified.

LabelTemplateName

String; input to the handler

The name of the label template that was modified.

Remarks

In some instances when a label template is modified, dbConnect triggers the following sequence of events:

  1. OnLabelTemplateCreate <temporary name starting from ASE>
  2. OnLabelTemplateDelete <label template name being modified>
  3. OnLabelTemplateCreate <label template name being modified>
  4. OnLabelTemplateDeleted <temporary name from 1>
See Also
    • OnLabelTemplateCreated
    • OnLabelTemplateDeleted


OnLinkTemplateCreated

OnLabelTemplateModified
Events
OnLinkTemplateDeleted
OnLinkTemplateCreated
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a new link template is saved in a drawing.

Signature

object.OnLinkTemplateCreated(Document, LinkTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document in which the link template was created.

LinkTemplateName

String; input to the handler

The name of the link template that was created.

Remarks

This event may be triggered when a drawing containing link templates is opened.

See Also
    • OnLinkTemplateModified
    • OnLinkTemplateDeleted


OnLinkTemplateDeleted

OnLinkTemplateCreated
Events
OnLinkTemplateModified
OnLinkTemplateDeleted
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a link template is deleted from a drawing.

Signature

object.OnLinkTemplateDeleted(Document, LinkTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document from which the link template was deleted.

LinkTemplateName

String; input to the handler

The name of the link template that was deleted.

See Also
    • OnLinkTemplateCreated
    • OnLinkTemplateModified


OnLinkTemplateModified

OnLinkTemplateDeleted
Events
OnQueryCreated
OnLinkTemplateModified
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when link template changes are saved in a drawing.

Signature

object.OnLinkTemplateModified(Document, LinkTemplateName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document containing the link template that was modified.

LinkTemplateName

String; input to the handler

The name of the link template that was modified.

Remarks

In some instances when a link template is modified, dbConnect triggers the following sequence of events:

  1. OnLinkTemplateCreate <temporary name starting from ASE>
  2. OnLinkTemplateDelete <link template name being modified>
  3. OnLinkTemplateCreate <link template name being modified>
  4. OnLinkTemplateDeleted <temporary name from 1>
See Also
    • OnLinkTemplateCreated
    • OnLinkTemplateDeleted


OnQueryCreated

OnLinkTemplateModified
Events
OnQueryDeleted
OnQueryCreated
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a new query is saved in a drawing.

Signature

object.OnQueryCreated(Document, QueryName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document in which the query was created.

QueryName

String; input to the handler

The name of the query that was created.

See Also
    • OnQueryModified
    • OnQueryDeleted


OnQueryDeleted

OnQueryCreated
Events
OnQueryModified
OnQueryDeleted
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when a query is deleted from a drawing.

Signature

object.OnQueryDeleted(Document, QueryName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document from which the query was deleted.

QueryName

String; input to the handler

The name of the query that was deleted.

See Also
    • OnQueryCreated
    • OnQueryModified


OnQueryModified

OnQueryDeleted
Events
OnQueryModified
Expand All
Expand all collapsed sections.
Collapse All
Collapse all expanded sections.

Triggered when query changes are saved in a drawing.

Signature

object.OnQueryModified(Document, QueryName)

Object

DbConnect object

An object expression that evaluates to a DbConnect container object.

Document

String; input to the handler

The name of the document from which the query was deleted.

QueryName

String; input to the handler

The name of the query that was deleted.

See Also
    • OnQueryCreated
    • OnQueryModified


Comments?

Using this form sends your comments to the Autodesk Technical Publications group responsible for this documentation.

Topic title and location (do not edit):
Name (optional):
         Email (optional):
Comments:

Note: This form is not intended as a way for you to receive feedback or technical support. The information you provide will be used to enhance future updates to the documentation. Thanks!