In addition to the other comments, in the case of looking for a non built-in parameter definition that is added to a host category (walls, floors, etc.), they can only be added via Binding within a document, thus <Document>.ParameterBindings would return the document's parameter BindingMap that you could then step through to find the one that you're after.
Dim paraBind As RDB.BindingMap = thisDoc.ParameterBindings
Dim paraIter As RDB.DefinitionBindingMapIterator = paraBind.ForwardIterator()
paraIter.Reset()
While paraIter.MoveNext = True
Dim thisDef As RDB.InternalDefinition = paraIter.[Key]
'Do Something
Dim sharedParam As RDB.SharedParameterElement = TryCast(thisDoc.GetElement(thisDef.Id), RDB.SharedParameterElement)
If sharedParam IsNot Nothing Then
'Do Something
Else
Dim localParam As RDB.ParameterElement = TryCast(thisDoc.GetElement(thisDef.Id), RDB.ParameterElement)
'Do Something
End If
If thisDef.GetGroupTypeId() <> Nothing Then
'Do Something
Else
'Do Something
End If
Dim typeBound As RDB.TypeBinding = TryCast(paraIter.Current, RDB.TypeBinding)
If typeBound IsNot Nothing Then
'Do Something
Dim Cats As RDB.CategorySet = typeBound.Categories
For Each cat As RDB.Category In Cats
'Do Something
Next
Else
Dim instBound As RDB.InstanceBinding = TryCast(paraIter.Current, RDB.InstanceBinding)
If instBound IsNot Nothing Then
'Do Something
Dim Cats As RDB.CategorySet = instBound.Categories
For Each cat As RDB.Category In Cats
'Do Something
Next
Else
'Do Something
End If
End If
End While
-G
Gary J. Orr
GaryOrrMBI (MBI Companies 2014-Current)
aka (past user names):
Gary_J_Orr (GOMO Stuff 2008-2014);
OrrG (Forum Studio 2005-2008);
Gary J. Orr (LHB Inc 2002-2005);
Orr, Gary J. (Gossen Livingston 1997-2002)