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: Ralf_Krieg

So here's what I have...I trigger on New and Open.

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") = ""
End If

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

So, from what I can tell, it's not creating the iProperty "fast enough" or there needs to be an updated before I run the second part of the code. The second part works well (tested), when parts do have the iProperty present.