Results 1 to 3 of 3

Thread: How to retrieve shared parameters in API?

  1. #1
    Member
    Join Date
    2008-07
    Posts
    30
    Login to Give a bone
    0

    Default How to retrieve shared parameters in API?

    Hi,

    Anybody can help me understand how to create Shared Paremeters in Revit and then retrieve these paramters in API?

    I have added three new shared parameters to the rooms in my Revit model. I am using RoomSchedule Sample that comes with Revit API SDK, and want to retrieve and use these three parameters in my code.
    The code uses Autodesk.Revit.Parameters, but it doesn't recognize any of the three shared parameters I have added to my Revit model. the error says:
    "Autodesk.Revit.Paramters.BuiltInParametes does not contain a definition for "..." (name of my parameter) "


    Thanks in advance for your help,

    AK

  2. #2
    100 Club
    Join Date
    2004-02
    Location
    Brookline, MA
    Posts
    186
    Login to Give a bone
    0

    Default Re: How to retrieve shared parameters in API?

    Amirek,

    Because Shared Parameters are not Built-in... you must access them a different way.

    It should be the same method:
    Element.Parameter( ... ) in VB or
    Element.get_Parameter( ... ) in C#

    But instead of passing the Builtin Parameter enum, you pass either the Name, or the Shared Parameter GUID, or the definition (which ever is handy).

    -Matt

  3. #3
    Member
    Join Date
    2009-02
    Posts
    30
    Login to Give a bone
    0

    Thumbs up Re: How to retrieve shared parameters in API?

    Hi,

    I am using RevitAPI in my c#.net application. I am creating two Shared parameters. Then I create Exit Plan Schedule and adding these two shared paramaters to this schedule.
    Now in my C# application, I am accessing this schedule but I am not able to access these parameters using

    'Element.get_Parameter("Exit Distance")'

    where 'Exit Distance' is the name of the shared paramter added to element(which is a schedule)

    How can I access these parameters?

    Waiting for your sincere reply.

    Thanks!
    Shifali
    Last edited by shifali.a; 2009-03-10 at 10:38 AM.

Similar Threads

  1. 2014: Criteria for Project Parameters vs. Shared Parameters
    By jagostinho in forum Revit - Platform
    Replies: 3
    Last Post: 2014-03-21, 02:46 PM
  2. Replies: 2
    Last Post: 2013-05-21, 06:47 PM
  3. 2012: Not using shared parameters
    By sdewitt in forum Revit Architecture - General
    Replies: 0
    Last Post: 2012-08-15, 11:15 PM
  4. How to retrieve parameters properties
    By some buddy in forum Revit - API
    Replies: 0
    Last Post: 2011-02-04, 09:00 PM
  5. shared parameters
    By jhiggen in forum Revit - Platform
    Replies: 33
    Last Post: 2008-05-08, 12:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •