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 delegate in a model (Visual Basic code)
  
Modeling a Visual Basic delegate in a model (Visual Basic code)
A Visual Basic delegate is modeled through a Modeler Type Definition.
To model a Visual Basic delegate in a model:
1. In Modeler, right-click the Package or Class or Interface that is to own the delegate:
Point to New, point to Typedef, and then click the command for the required Construction.
or
Point to New, point to UML, point to Structure, point to Typedef, and then click the command for the required Construction.
2. Type the name of the delegate, and then press the Enter key.
3. Right-click the Type Definition, point to Applied Stereotypes, and then clickVB Delegate.
4. Open the Type Definition's Property Pages, and then click the VB Delegate tab.
5. Set the value of the VB DelegateText tag definition to the sub or function that is invoked by the delegate.
6. Set the properties of the Type Definition as required.
For more information about how ACS generates the values of a Type Definition's properties, see the related link below.