PDA

View Full Version : Shared Parameter Access



michael.montagne
2008-01-07, 07:00 PM
I see an example in the SDK that shows me how to access builtin parameters but not how to get and set shared parameters for a room object. I'm a pretty experienced Lisp/VBA guy but very new to the C# world. This project is my entry to both Revit API work and C#. Can anyone offer an an example I can run with?

-mjm

Elizabeth Shulok
2008-01-07, 11:52 PM
Have you seen the BeamAndSlabNewParameter sample project? It adds and uses a shared parameters for beams and slabs.

Danny Polkinhorn
2008-01-08, 09:42 PM
Hi Michael,

One more thing. When you access an object's parameters, you're able to access all the parameters at the same time, regardless of their type.

-Danny

michael.montagne
2008-01-08, 10:41 PM
That does give me lots of help. Thanks. All I want is Room objects. Even in my small project (a few walls and 4 rooms) it takes a while to walk everything and there are lots of elements accessed. Is there a quicker filter for "just room elements"?

-mjm

Danny Polkinhorn
2008-01-09, 01:58 AM
Yes, there's an excellent example of optimizing iterations in a recent post here (http://forums.augi.com/showthread.php?t=72324). Because Room objects are exposed in the API, the principles are the same as ViewSheet objects.

r.howarth
2008-01-14, 02:03 AM
Yeah have a look at my question - download the TestForRod file that guy kindly made, it shows you how to iterate through the elements efficiently (thats the idea, you iterate through all of the elements till you find one that matches the type you want)

also look at these webcasts for some good information:
http://download.autodesk.com/media/adn/DevTV_Introduction_to_Revit_Programming/

(or download link: http://download.autodesk.com/media/adn/DevTV_Introduction_to_Revit_Programming.zip )

they helped me alot