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

Function ParameterExists(paramName As String) As Boolean
	
	Dim doc As Document = ThisDoc.Document
	Dim params As Parameters
	If doc.DocumentType = Inventor.DocumentTypeEnum.kDrawingDocumentObject Then
		params = doc.Parameters
	Else
		params = doc.ComponentDefinition.Parameters
	End If

	For Each p As Parameter In params
		If p.Name = paramName Then Return True
	Next p

	Return False

End Function 'ParameterExists

 

You can add this function to your code - it'll return True if the parameter name you give it exists in the document.