Visual Basic | |
---|---|
Public Interface ICustomData |
C# | |
---|---|
public interface ICustomData |
JavaScript | |
---|---|
Object dsCustomData |
COM native C++ | |
---|---|
interface ICustomData |
C++ | |
---|---|
class dsCustomData |
Add, Modify, and Remove Custom Data (VB.NET)
Add, Modify, and Remove Custom Data (VBA)
Add and Modify Custom Data (JavaScript)
Custom data is non-graphical information that you can add to an entity in a drawing to supplement the data available via the entity's interface.
Custom data is made up of:
- Markers, which are stored as integers and which help identify the data type of the custom data. Valid values for markers are shown in the following table.
- Data, which are variable data types such as strings, doubles, integers, etc.
Marker | Data | Data type |
1000 | Text | String |
1003 | Layer name | String |
1004 | Binary chunk | Variable-length binary array; maximum of 127 bytes |
1005 | Handle of an entity | String |
1010 − 1013 | Point | Three numbers |
1020 − 1059 | Double | Double |
1060 − 1070 | Integer | Signed 16-bit integer, also called Int16 |
1071 | Integer | Signed 32-bit integer, also called Int32 |
Custom data is stored in an entity using markers.
Because multiple applications can add custom data to an entity, use unique names to differentiate your custom data from that of other applications. Custom data names are stored in a drawing document's list of registered applications, which you can search to determine a unique name for your custom data.
After determining a unique name for your custom data, use an entity's:
- GetCustomData method to create the entity's CustomData object. Use the ICustomData methods to add data to the entity's CustomData object.
- SetCustomData method to change an entity's CustomData object.
- DeleteCustomData method to delete an entity's CustomData object.
- Handle property to get the entity's CustomData object's handle. Because entities can reference other entities by saving the handles of other entities in their custom data, handles do not have to be unique.
IAttributeDefinition::GetCustomData
IAttributeInstance::GetCustomData
IBlockDefinition::GetCustomData
IDimensionStyle::GetCustomData
IEmbeddedObject::GetCustomData
IGeneralDimension::GetCustomData