07-22-2024
02:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-22-2024
02:06 PM
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.