Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Visual Basic code > Modeling Visual Basic code in a model > Modeling a Visual Basic property in a model (Visual Basic code)
  
Modeling a Visual Basic property in a model (Visual Basic code)
A Visual Basic property is modeled through a Modeler Attribute or Role:
Use an Attribute when the type of the property is not a class, structure, interface or module.
Use a Role when the type of the property is a class, structure, interface or module.
To model a Visual Basic property through an attribute in a model:
1. In Modeler, right-click the Class, Data Type or Interface that models the element that is to own the Visual Basic property, point to New, and then click Attribute.
2. Type the name of the Visual Basic property, and then press the Enter key.
3. Right-click the Attribute, point to Links > Stereotypes, and then click VB Attribute.
4. Right-click the Attribute, point to Links > Stereotypes, and then click VB Property.
5. Set the values of the Attribute's standard properties and Tag Definitions (applied by the «VB Attribute» and «VB Property» stereotypes) as required.
For more information about how ACS generates the values of an Attribute's standard properties and Tag Definitions, see the related links below.
For more information, see Setting a tagged value for an applied tag definition.
To model a Visual Basic property through a role in a model:
1. On a Class Diagram, create an Association from the Class, Data Type or Interface that models the element that is to own the Visual Basic property; to the Class, Data Type or Interface that models the element that is to be the type of the Visual Basic property.
2. In the Packages pane, expand the Class, Data Type or Interface that is to own the Visual Basic property, and locate the Role you have created through the Association.
3. Set the Name of the Role to that of the Visual Basic property you want to create.
4. Right-click the Role, point to Links > Stereotypes, and then click VB Property.
5. Set the Role's standard properties and Tag Definitions (applied by the «VB Role» and «VB Property» stereotypes) as required.
For more information, see Setting a tagged value for an applied tag definition and the related links below.