Results 1 to 3 of 3

Thread: Parameters with API?

  1. #1
    Member
    Join Date
    2005-05
    Posts
    10

    Default Parameters with API?

    Hi all,

    I have a question about using API Parameters command. While testing the sample code "FireRating" in the revit SDK file, I notice that every time the "ApplyParameter" is executed, it create a new parameter name "Fire Rating" to all the doors.

    The problem is revit doesn't care if the parameter is there or not, so every time time the command is executed, a new parameter is created. So my question is; is there a way to make revit actually do a test for the existing of the parameter first, and than either create a new one or just update the value. Thanks in advance.

    TH

  2. #2
    100 Club dtownsend's Avatar
    Join Date
    2006-06
    Location
    Atlanta, GA
    Posts
    163

    Default Re: Parameters with API?

    You can access parameter names...
    PHP Code:

    Dim param 
    As Autodesk.Revit.Paramet

    param
    .Definition.Name "FireRating" 
    You could check to see if the element has a parameter with the name FireRating and if it does then don't add it again.

  3. #3
    Member
    Join Date
    2005-05
    Posts
    10

    Default Re: Parameters with API?

    Thanks a lot Dustin, I will give that a try!

Similar Threads

  1. Reporting Parameters broke nested parameters
    By Andre Baros in forum Revit Architecture - Families
    Replies: 4
    Last Post: 2010-09-09, 10:35 PM
  2. Linking door and window parameters to room parameters
    By Mangrove in forum Revit Architecture - Families
    Replies: 5
    Last Post: 2008-12-03, 07:27 PM
  3. Using Flip parameters with Linear parameters?
    By Steve_Bennett in forum Dynamic Blocks - Technical
    Replies: 4
    Last Post: 2007-02-05, 08:38 PM

Posting Permissions

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