Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Visual Basic code > Mapping information > Data type mapping for Visual Basic (Visual Basic code)
  
Data type mapping for Visual Basic (Visual Basic code)
For each Data Type, ACS generates a structure or module: If the «VB Class» and «VB Unit» stereotypes are applied to the Data Type and the value of the VB UnitType tag definition is set to Module, ACS generates a module.
If the «VB Unit» stereotype is not applied to the Data Type, ACS generates the structure or module in its owner's namespace. If the «VB Unit» stereotype is applied to the Data Type, ACS generates the structure or module in its own file.
If the «VB DontGenerate» stereotype is applied to a Data Type, ACS ignores that Data Type.
The data type declaration and body is derived from the items it owns, properties of the Data Type, and the tagged values set for Tag Definitions applied by the «VB Class» and «VB Unit» stereotypes.
ACS generates the child items, properties and tagged values of a Data Type as follows.
Child items:
If the Data Type owns any Attributes, ACS generates each Attribute as a field or property. For more information about Attribute mapping, see Attribute mapping for Visual Basic (Visual Basic code).
If the Data Type owns any Operations, ACS generates each Operation as a function, event handler, event or operator. For more information about Operation mapping, see Operation mapping for Visual Basic (Visual Basic code).
If the Data Type owns any Roles, ACS generates the each Role as a field or property. For more information about Role mapping, see Association and role mapping for Visual Basic (Visual Basic code).
Properties:
Abstractproperty - when set to true (Abstract check box selected on Property Pages), ACS generates the structure or module with the MustInherit modifier.
Description property - if a value is set, ACS generates that value on the line before the structure or module declaration. For information about how comments are generated, see Generation of code comments (Visual Basic code).
Name property - ACS generates the property as the identifier of the structure or module.
* 
ACS may modify the structure or module identifier that is added to the code to make it valid for Visual Basic. You can specify the exact identifier to use through the CODE_GENERATION_NAME property of a Data Type. Tell me more...
Template property - when set to True (Template check box selected on Property Pages), ACS generates the Data Type as a Visual Basic generic type. ACS generates the Formal Template Parameters as the type parameters after the structure or module identifier.
Visibility property - this property can be set to Public, Private, Protected or Package: ACS generates the value as the access of the structure or module (Package is generated as Public). ACS generates private and protected access only for nested Data Types.
Tag Definitions:
You can apply the «VB Class» and «VB Unit» stereotypes to a Data Type.
The «VB Class» stereotype applies the following Tag Definitions to a Data Type:
VB Attributes tag definition - if a value is set, ACS generates that value as .NET attributes of the property, that is, before the access of the structure or module. The .NET attributes should take the form of <AtrClass(OptInitList)>.
VB Declare tag definition - if a value is set, ACS generates that value as the declare clauses for the structure or module.
If reverse engineering is enabled in ACS, you can change the declare clauses in the code file and ACS will update the VB Declare property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).
VB Implements tag definition - if a value is set, ACS generates a colon after the name of the structure or module (or after the VB Inherits value if specified), and then generates the value after the colon. For example, you can set the value to 'Implements Mylft'.
VB Inherits tag definition - if a value is set, ACS generates a colon after the name of the structure or module, and then generates the value after the colon. For example, you can set the value to 'Inherits MyClass'.
VB Partial tag definition - when set to True, ACS generates the Partial keyword before the access of the structure or module.
VB UnitType tag definition - When the «VB Unit» stereotype is applied to the Data Type and the VB UnitType tag definition is set to Module, ACS generates a module rather than a structure.
When the «VB Unit» stereotype is applied to a Data Type, ACS generates the structure or module in its own file. The «VB Unit» stereotype applies the following Tag Definitions to a Data Type:
VB UnitLocation tag definition - if a value is set, ACS uses the value to determine the name of the generated Visual Basic unit file and the folder in which that unit file is generated. For example:
A value of MyFile results in ACS generating a file named MyFile.vb in the ACS target folder.
A value of MySubfolder\MyFile results in ACS generating a file named MyFile.vb in a folder named MySubfolder, which ACS creates as a subfolder of the ACS target folder.
VB Imports tag definition - if a value is set, ACS generates that value as import clauses in the Visual Basic unit file.
If reverse engineering is enabled in ACS, you can change the import clauses in the code file and ACS will update the VB Imports property in the model.
For information about maintaining reversible properties through ACS, see Strategy for maintaining reversible properties (ACS).