Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello again, here I am struggling with another part of my code.
I can succesfully change the parameter name of a dimension but if the parameter name allready exists it crashes on me, cant figure out how to prevent that.
here is my code
Public Sub ChangeAngleName(ThisApplication As Inventor.Application)
'Declare document Active
Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument
Dim oNumber As String
oNumber = "Bend_" & txtbName1.Text
If oNumber = "" Then
MsgBox("Write a Bend Number")
Else
Dim oDim As Object
oDim = oDoc.SelectSet(1)
'here it crashes if parameter name allready exists
oDim.Parameter.Name = oNumber
End If
Solved! Go to Solution.