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

Hello

 

I've tested it on open document trigger and it works as expected. Can you please try it with this alternative way of adding new iProp?

I assume there's no other rule running? Did you see an error message or does still nothing happen? Are you opening parts separat or are they placed/created in an assembly?

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

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

 


R. Krieg
RKW Solutions
www.rkw-solutions.com