Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
RNDinov8r
in reply to: RNDinov8r

I even threw a pause in there..thinking it was running into the next instruction before the iProperty could be created....and even at 1 second (a billion years in computer time), I still get the same error. 

Dim iProp As Inventor.Property
For Each iProp In ThisDoc.Document.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
	If iProp.Name = "Form Factor" Then Exit For
Next

If iProp Is Nothing Then
	'iProperties.Value("Custom", "Form Factor") = ""
	ThisDoc.Document.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}").Add("","Form Factor")
End If

System.Threading.Thread.CurrentThread.Sleep(1000)

If iProperties.Value("Custom", "Form Factor") = "" Then
	Dim FormFactor As String = MessageBox.Show("Is this part a round Part?", "Round Stock Info", MessageBoxButtons.YesNo)
	If FormFactor = vbYes Then
		iProperties.Value("Custom", "Form Factor") ="ROUND"
	Else
		iProperties.Value("Custom", "Form Factor") ="SQUARE"
	End If
End If