Results 1 to 5 of 5

Thread: Can't find parameter to change it

  1. #1
    Active Member
    Join Date
    2009-04
    Posts
    85
    Login to Give a bone
    0

    Default Can't find parameter to change it

    Hi,

    Here is a question that might be simple for most contributors here, but I'm stuck.

    I have a structural model and a routine that inserts a Generic Family symbol (a little tag) at specific coordinates:

    Code:
    dbDoc.Create.NewFamilyInstance(InsPoint, symbol, StructuralType.UnknownFraming);
    The Family has a Text type, Shared and Instance parameter (see attached image), whose value by default it’s an empty string.

    I would like to change the value of the parameter after the insertion, with the value (X, Y, Z) of the argument InsPoint used for the insertion, so that the tag becomes more visible.

    I’ve been able to find a lot a parameters (family, symbol, instance, type) but not this one!

    I'm convinced that it's something very simple, but I'm giving up!

    Can anybody help, please?

    TIA,

    Buddy
    Attached Images Attached Images

  2. #2
    Member
    Join Date
    2012-09
    Posts
    34
    Login to Give a bone
    0

    Default Re: Can't find parameter to change it

    Something like this:
    Code:
    FamilyInstance familyInstance = dbDoc.Create.NewFamilyInstance(InsPoint, symbol, StructuralType.UnknownFraming);
    
    string coordinateString = InsPoint.X.ToString("F2") + ", " + InsPoint.Y.ToString("F2") + ", " + InsPoint.Z.ToString("F2");
    
    familyInstance.get_Parameter("XYZ").Set(coordinateString);
    I'm assuming InsPoint is an XYZ point, if it's not then adjust the code accordingly.

    double.ToString("F2") will cause the number to appear with 2 decimal places

    The above code will also need to take place during a Transaction.

  3. #3
    Active Member
    Join Date
    2009-04
    Posts
    85
    Login to Give a bone
    0

    Default Re: Can't find parameter to change it

    Thanks cshha,

    That was really simple, I think I was way too tired because of all the trial-error efforts of yesterday and somehow, I couldn't see the forest for the trees

    Regards,

    Buddy

  4. #4
    Member
    Join Date
    2012-09
    Posts
    34
    Login to Give a bone
    0

    Default Re: Can't find parameter to change it

    No problem. In future you should take a look at RevitLookup (part of the SDK) or BipChecker, which both let you examine all of the parameters of an element

  5. #5
    Active Member
    Join Date
    2009-04
    Posts
    85
    Login to Give a bone
    0

    Default Re: Can't find parameter to change it

    I will, thanks.

    Buddy

Similar Threads

  1. Find text, change layer
    By demetrius.adams707933 in forum AutoLISP
    Replies: 1
    Last Post: 2015-09-01, 11:24 PM
  2. mass change like find and replace
    By Wish List System in forum AutoCAD Wish List
    Replies: 3
    Last Post: 2015-06-03, 12:51 PM
  3. 2015: Duplicated parameter in Find item drop down list
    By Bimerworld in forum NavisWorks - General
    Replies: 1
    Last Post: 2014-12-08, 04:13 PM
  4. Change Project Parameter to Shared Parameter?
    By kgodfrey in forum Revit Structure - General
    Replies: 0
    Last Post: 2008-11-12, 04:43 PM
  5. Can not find Change Space command in ADT 2007
    By klowery in forum ACA General
    Replies: 7
    Last Post: 2006-07-28, 12:44 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
  •