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: 

Retrieving shared parameters into a schedule

3 REPLIES 3
Reply
Message 1 of 4
poslatosenac
246 Views, 3 Replies

Retrieving shared parameters into a schedule

 Hi Everyone,

 

I am trying to solve a problem: thats possible to retrieving shared parameters into a schedule using the API ?

 

if so can anyone help me,  truly need a help.

 

Thanks

 

Ludmila

3 REPLIES 3
Message 2 of 4

Hi @poslatosenac,

There's a good example of schedule creation in the SDK (refer to the second post in this forum if you need help finding that).

The function to search for is GetSchedulableFields.

It returns an  IList of SchedulableField.

Use SchedulableField.GetName(doc) to return the parameter name and compare that to the name of the shared parameter you want to add.

 

If your parameter isn't there, it can't be scheduled (in that schedule).

 

Cheers,

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 3 of 4

HI Matt,

 

thanks a lot for the help ! 

 

Another thing I am very  newbie ! Saying that could you please write  some code for me to do that?

 

Thanks a lot !!

Message 4 of 4

Hi @poslatosenac,

You're so funny.

The only thing missing from the SDK example is something like this:

Dim field1 As DB.SchedulableField = _
schedulableFields.Where(Function(sf) _
sf.GetName(doc) = "Name of Shared Parameter").FirstOrDefault

 

If the learning curve to get this going is too steep, then you may want to do some self-learning first.

 

https://forums.autodesk.com/t5/revit-api-forum/check-out-the-self-paced-guide-my-first-plug-in/m-p/3...

And MyFirstPlugin

 

Of course, if you're not up to the task yourself, you may find this post useful:

http://thebuildingcoder.typepad.com/blog/2011/12/finding-a-development-partner.html

 

Happy Friday!

 

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community