- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I'm trying to develop my first add-in, i have some experience with Ilogic and right now I'm struggling with te basics of it.
The add-in will work for old inventor files or imported components, so we can add some custom Iproperties.
the problem i will asume is very basic but i cant seem to figure out how to structure the create property...
using visual studio 2015
here is my code
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
'Public Sub CreateCustomProperties()
' Get the active document.
Dim invDoc As Document
invDoc = _invApp.ActiveDocument
' Get the user defined (custom) property set.
Dim invCustomPropertySet As PropertySet
invCustomPropertySet = invDoc.PropertySets.Item("Inventor User Defined Properties")
' Declare some variables that will contain the various values.
Dim strProv As String
Dim strTel As String
Dim strMail As String
Dim strTe As String
' Set values for the variables.
strProv = "AGREGAR PROVEEDOR"
strTel = "AGREGAR TELEFONO"
strMail = "AGREGAR CORREO ELECTRONICO"
strTe = "AGREGAR TIEMPO DE ENTREGA"
' Create the properties.
Dim invProperty As [Property]
invProperty = invCustomPropertySet.Add(strProv, "PROVEEDOR")
invProperty = invCustomPropertySet.Add(strTel, "TELEFONO")
invProperty = invCustomPropertySet.Add(strMail, "CORREO")
invProperty = invCustomPropertySet.Add(strTe, "T.E")
End Sub
Solved! Go to Solution.