Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Whats the deal with get_Parameter()? (insert Seinfeld Bassline here)

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
justin.wolters
411 Views, 7 Replies

Whats the deal with get_Parameter()? (insert Seinfeld Bassline here)

This is more of a request for a history lesson here about the Revit api, but whats the deal with the method get_Parameter()? I've seen it used in past forum posts for use in Revit versions before 2022, but I don't see any references to it in the revitapidocs. Does anyone know where it stems from (the API, another API, the enchanted jungle of BIM?) and if still a valid method to use today in leau of GetParameter() method (seems far easier to just use get_Parameter with a GUID vs GetParameter.

Thanks!

justinwolters_0-1679683002802.jpeg

 

7 REPLIES 7
Message 2 of 8

Hi.

  

Sorry that I do not feel motivated to answer this in full.

   

I addressed the exact same question here in the forum recently. So, all you get is the short version:

  

https://duckduckgo.com/?q=.net+get_+property+prefix

  

Please figure it out yourself from there, or search for the previous answer to the same question.

  

Happy weekend!

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 8

I made the effort of searching for the previous answer as well.

 

Since it has come up twice in a row, I guess I'll add it to the blog anon.

 

Here it is:

  

https://forums.autodesk.com/t5/revit-api-forum/importinstance-geometry-vs-get-geometry/m-p/11720577

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 4 of 8

Oh, and to wrap up: what is the Seinfeld bassline, please?

  

Later: I guess it is common knowledge, just not to me:

  

https://youtu.be/RH2Wz9MqqGI

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 5 of 8

Thanks for the link(s) @jeremy_tammik. those helped figure it out!

As for the Seinfeld bassline bit, that was my poor attempt at humor :).

Have a good weekend as well!

Message 6 of 8
Sean_Page
in reply to: justin.wolters

There is a reference to it here in the older literature. (and New)

https://www.revitapidocs.com/2020/0cf342ef-c64f-b0b7-cbec-da8f3428a7dc.htm

 

I think this dates back a long ways including references in 2010...

https://thebuildingcoder.typepad.com/blog/2010/08/get-element-type.html 

 

Message 7 of 8
RPTHOMAS108
in reply to: Sean_Page

This is not the same. It isn't an API design choice it is just calling an underlying method because C# can't use indexed properties.

 

Every indexed property has an underlying method in MSIL to retrieve the value these are prefixed 'get_' . So to avoid the indexed property issue C# uses the underlying method directly instead.

 

RPTHOMAS108_0-1679750469743.png

 

Note that in above example 'RowKey' has no 'set_RowKey' because it is ReadOnly.

Message 8 of 8
Sean_Page
in reply to: RPTHOMAS108

Thanks for the clarification @RPTHOMAS108 !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report