Components Element Reference
The Components element is used to specify the components that make up one version of the plug-in.
More than one Components element can be used to identify the components for a plug-in; each Components element can identify one or more components. Platform and product information for
a Components element is defined with the RuntimeRequirements element.
If all the components defined within a Components element apply to the same platform, you do not need to add a RuntimeRequirements element to each individual ComponentEntry element.
Along with the RuntimeRequirements element, the Components element can contain one or more of the following elements
- ComponentEntry
- RegistryEntries
- SystemVariables
- EnvironmentVariables
The following outlines the basic relationship of the Components element and any elements it can contain.
<Components <RuntimeRequirements ... / <RegistryEntries <RegistryEntry ... / </RegistryEntries <SystemVariables <SystemVariable ... / </SystemVariables <EnvironmentVariables <EnvironmentVariable ... / </EnvironmentVariables <ComponentEntry ... <RuntimeRequirements ... / </ComponentEntry <ComponentEntry ... / <Commands ... <Command ... / </Commands </Components
ComponentEntry Element – Supported in AutoCAD 2013-based products and later
The ComponentEntry element is required and is used to specify details about each individual component
in the Components element.
You can specify as many ComponentEntry elements as needed. Component types can be one of the following file formats:
- AutoLISP (LSP)
- AutoLISP Fastload (FAS)
- ObjectARX (ARX)
- ObjectDBX (DBX)
Windows only
- Compiled AutoLISP Project/Visual LISP (VLX)
- Extensible Application Markup Language (XAML)
- JavaScript (JS)
- Managed or Mixed Mode .NET Assembly (DLL)
- Partial Customization (CUI/CUIx)
- Tool Palette (ATC)
- VBA Project (DVB)
A ComponentEntry element may contain a Commands element if the LoadReasons attribute is set to LoadOnCommandInvocation.
any files that other components are dependent on must be lower down the list. For
example, if an ObjectARX module is dependent on an ObjectDBX module, then the ObjectARX
module will need to appear above the ObjectDBX module in the list.
A ComponentEntry element can have any of the following attributes attached to it:
Attribute |
Description |
---|---|
AppName |
Optional for AutoLISP; Required for ObjectARX and .NET – Component name; same as AppName in the ObjectARX API AcadAppInfo class. |
AppDescription |
Component description; same as AppDescription in the ObjectARX API AcadAppInfo class. |
AppType |
Component type; overrides the type derived from the file extension provided in the The component type can be one of the following:
|
ModuleName |
Relative path to the component within the bundle; same as ModuleName in the ObjectARX API AcadAppInfo class. The component type is determined from the file extension:
If your application will handle multiple languages, different versions of a specific NOTE:All path specifiers are ‘/’ and not ”, and paths are relative to the root .bundle folder.
|
PerDocument |
AutoLISP only – When True, the AutoLISP file is loaded once per document. Default |
Loadreasons |
Multiple values can be specified – Defines the load behavior parameters for the component By default, LoadOnAutoCADStartup, LoadOnAppearance, and LoadOnProxy are enabled (set to True) if LoadReasons is not specified. If parameters need to be disabled (set to False), the LoadReasons element must be specified along with the parameters set to False. By default, LoadOnCommandInvocation is disabled, enabling it will disable LoadOnAutoCADStartup and LoadOnAppearance unless they are explicitly enabled. If one or more Command elements is defined as See the ObjectARX Reference VCade for full details on AcadAppInfo LoadReasons. Valid parameter values:
The following parameters are available:
|
XamlType |
XAML type; currently the only supported value is “ContextualTabRule” and it is required |
RegistryEntries Element – Supported in AutoCAD 2015-based products and later
The RegistryEntries element is optional, and can contain one or more RegistryEntry elements. A RegistryEntry element contains the definition of a registry entry that the plug-in should create
or modify. Registry entries are stored in the Windows Registry or in a property list
(PLIST) file on Mac OS.
location is used in the PLIST files on Mac OS.
RegistryEntry Element
Attribute |
Description |
---|---|
Name |
Name of the registry entry to create or modify. |
Value |
Value to assign to the registry entry. The value can include one of the optional operator prefixes: +, –, &, and |. See the “Variable Value Operator Prefixes” section for more information. NOTE:The operator prefix is not retained when the value is applied to the registry entry.
|
Type |
Data type to assign to the registry entry. Optional when modifying an existing registry Valid values are:
If an operator prefix is used as part of the registry entry’s value, the appropriate |
Flags |
Optional, creation and modification flags. Multiple flags can be specified; use a The following flags are supported:
NOTE:The Open or OpenOnce flag must be used to modify the value of a registry entry.
|
The following example creates the registry key MYREGKEY and adds the values STRING
and NUMBER:
<RegistryEntries <RegistryEntry Key="MYREGKEY" Name="STRING" Value="Example" Type="REG_SZ" / <RegistryEntry Key="MYREGKEY" Name="NUMBER" Value="123" Type="REG_DWORD" / </RegistryEntries
SystemVariables Element – Supported in AutoCAD 2015-based products and later
The SystemVariables element is optional, and can contain one or more SystemVariables elements. A SystemVariable element contains the definition of a system variable that the plug-in should create
or modify.
SystemVariable Element
Attribute |
Description |
---|---|
Name |
Name of the system variable to create or modify. |
Value |
Value to assign to the variable. The value can include one of the optional operator prefixes: +, –, &, and |. See the “Variable Value Operator Prefixes” section for more information. NOTE:The operator prefix is not retained when the value is applied to the variable.
|
PrimaryType |
Data type to assign to the variable. Optional when modifying an existing system variable. Valid values are:
If an operator prefix is used as part of the variable’s value, the appropriate data |
StorageType |
Storage location for the variable’s value; when persisted. Optional when modifying Valid values are:
|
Owner |
Optional, AcRX service name. Used to make a system variable read-only and only modifiable by the application that |
Flags |
Optional, creation and modification flags. Multiple flags can be specified; use a The following flags are supported:
NOTE:The Open or OpenOnce flag must be used to modify the value of a variable.
|
The following example creates a system variable named MYVARIABLE:
<SystemVariable Name="MYVARIABLE" PrimaryType="String" StorageType="User" Value="Example" Owner="" Flags="Create|DotIsEmpty|SpacesAllowed" /
The following example changes the value of the CURSORSIZE system variable to 100 when
the plug-in is loaded the first time:
<SystemVariable Name="CURSORSIZE" Value="100" Flags="OpenOnce" /
EnvironmentVariables Element – Supported in AutoCAD 2015-based products and later
The EnvironmentVariables element is optional, and can contain one or more EnvironmentVariable elements. A EnvironmentVariable element contains the definition of an environment variable that the plug-in should
create or modify. Environment variables are stored in the Windows Registry or in a
property list (PLIST) file on Mac OS.
an environment variable is case sensitive.
EnvironmentVariable Element
Attribute |
Description |
---|---|
Name |
Name of the environment variable to create or modify. |
Value |
Value to assign to the variable. The value can include one of the optional operator prefixes: +, –, &, and |. See the “Variable Value Operator Prefixes” section for more information. NOTE:The operator prefix is not retained when the value is applied to the variable.
|
Type |
Optional, data type that Value represents. Valid values are:
If an operator prefix is used as part of the variable’s value, the appropriate data |
Flags |
Optional, creation and modification flags. Multiple flags can be specified; use a The following flags are supported:
NOTE:The Open or OpenOnce flag must be used to modify the value of a variable.
|
The following is an example of creating two environment variables named MYNUMVAR and
MYSTRVAR:
<EnvironmentVariables <EnvironmentVariable Name="MYNUMVAR" Value="123" / <EnvironmentVariable Name="MYSTRVAR" Value="Example" / </EnvironmentVariables
Operator Prefixes for Variable Values
Operator prefixes are used to modify the current value of a variable when the plug-in
is loaded. You can add one of the operator prefixes listed in the following table
to the Value attribute of a RegistryEntry, SystemVariable, or EnvironmentVariable element.
Prefix |
Description |
---|---|
+ (plus sign) |
Adds or appends a value to an existing variable’s value. Int16, Int32, Real: Adds Value to an existing variable’s value. String: Appends Value to an existing variable’s value. |
– (hyphen) |
Subtracts or removes a value to an existing variable’s value. Int16, Int32, Real: Subtracts Value from an existing variable’s value. String: Removes Value from an existing variable’s value. |
& (ampersand) |
Bitwise-and operation with the existing value of the variable; only numeric values |
| (pipe symbol) |
Bitwise-or operation with the existing value of the variable; only numeric values |
add a backslash before the operator. For example, if the variable’s value is supposed
to be +radius, enter the value as +radius.
The following always enables the END, MID, CEN, NOD, QUA, and INT running object snaps,
and leaves all other object snap settings as-is:
<SystemVariable Name="OSMODE" Value="|63" Flags="Open" /
Commands Element – Supported in AutoCAD 2013-based products and later
The Commands element is optional unless the LoadOnCommandInvocation parameter is enabled for the LoadReasons attribute. Used to specify which commands to register for LoadOnCommandInvocation.
You can specify more than one Command element as needed.
A Commands element can have the following attribute attached to it:
Attribute |
Description |
---|---|
GroupName |
Name used to organize related commands. |
Command Element – Supported in AutoCAD 2013-based products and later
Specifies the global and local names for each command.
A Command element can have any of the following attributes attached to it:
Attribute |
Description |
---|---|
Global |
Global command name. |
Local |
Local command name. Commands can be defined for multiple languages by combining Local with a locale code. See Supported Locale Codes Reference for a full list of supported |
HelpTopic |
Help topic to open when the command is active and F1 is pressed. NOTE:To display the help topic, a help file must be assigned to the plug-in. The help file
location for the plug-in is specified with the HelpFile attribute under the ApplicationPackage element. |
StartupCommand |
Executes the command at startup when True. |
Related Concepts
e Components element is used to specify the components that make up one version of the plug-in. More than one Components element can be used to …Components elements can be used to identify the components for a plug-in; each Components element can identify one or more components.element ref, to properly anchor a hover component to it. However i get the components …reference to a DOM node: … React will call the ref callback with the DOM element when the component …element is just syntactic sugar for calling React. … Component API Reference for a list of methods and properties related to the base React.Components is an HTML-related technology which makes it possible to, essentially, create and use custom elements as …Component Element. … Directory, String, Sets the Directory of the Component. … increments the reference count in the shared DLL registry of the component's …… We're using the new (and excellent) knockout components, and came across a situation where we need to access the DOM element for the …components match only elements –> <div ng-controller="MainCtrl as ctrl"> … Note however, that both parent and component scope reference the same object, …