Enumeration for ReferencePlane Parameter BuiltInParameter.ELEM_REFERENCE_NAME?

Enumeration for ReferencePlane Parameter BuiltInParameter.ELEM_REFERENCE_NAME?

m.buehler1
Contributor Contributor
993 Views
4 Replies
Message 1 of 5

Enumeration for ReferencePlane Parameter BuiltInParameter.ELEM_REFERENCE_NAME?

m.buehler1
Contributor
Contributor

The ReferencePlane element Parameter ELEM_REFERENCE_NAME is of type int (defining 'Is Reference')

- Is there a related .NET enumeration which can be used?

 

Revit 2018 introduced enum FamilyInstanceReferenceType with similar content (Left, CenterLeftRight, ..) - but it seems that the integer values do not match 1:1.

0 Likes
994 Views
4 Replies
Replies (4)
Message 2 of 5

BardiaJahan
Advocate
Advocate
0 Likes
Message 3 of 5

xiaodong_liang
Autodesk Support
Autodesk Support

Hi @m.buehler1 ,

 

I might be missing something, can I know if you want to have the integer list of  BuiltInParameter?  In addition, when you said 'FamilyInstanceReferenceType integer values do not match 1:1, could you share a snapshot how you checked? 

or, the reply of message 2 has answered your question?

Thank you.

0 Likes
Message 4 of 5

m.buehler1
Contributor
Contributor

Yes .. actually this was about getting integer value vs name (C# enum) .. rather than creating own enum object.

0 Likes
Message 5 of 5

jeremytammik
Autodesk
Autodesk

This is not a Revit API question, but a generic .NET one.

 

Always search the Internet before asking anything at all.

 

In this case, you can search for '.net integer of an enum':

 

https://duckduckgo.com/?q=.net+integer+of+an+enum

 

That produces this hit, among a couple of thousand other equally useful ones:

 

https://stackoverflow.com/questions/943398/get-int-value-from-enum-in-c-sharp

 

Correction:

 

Oh no, I see that you are looking at a built-in parameter value that returns an integer from a very limited set, each of which means something very specific. Sorry for the first answer, that is beside the point.

 

I search globally for ELEM_REFERENCE_NAME and found nothing useful, so I guess you will have to define your own enumeration values.

 

Please share them with us, in case anyone else runs into the same need.

 

Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes