Donate Now Goal amount for this year: 2500 USD, Received: 1627 USD (65%)

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
Like Tree1Likes

Thread: rename importinstance (type)

  1. #1
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    850
    Current Local Time
    03:38 AM

    rename importinstance (type)

    previously (2015?) Dynamo have node to rename importinstance (type), for instance, Element.Type, Element.SetName, etc

    now what i can think or find is Element.SetParameterByName, but i cannot set "Type" parameter (because its storage type is not string), or "Name" parameter (because it's read-only parameter)

    is it because OOTB Element.SetParameterByName is only for instance parameter?

  2. #2
    New Member
    Join Date
    January 22, 2018
    Posts
    1
    Current Local Time
    10:38 AM
    I look forward to Appling this theory.

  3. #3
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    11:38 AM
    Hello Ning,

    You can't rename the Import Instance - as the name is derived from the actual DWG name, unless I'm mistaken.

  4. #4
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    850
    Current Local Time
    03:38 AM
    see uploaded JPG for your info, happy new year Sol!
    Attached Thumbnails Attached Thumbnails rename importinstance (type)-capture.png  

  5. #5
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    11:38 AM
    Try Clockwork's Element.SetName node?

  6. #6
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    850
    Current Local Time
    03:38 AM
    thanks Sol, you're right, can only rename type, in fact, i try to create 3D rooms w/o all non-sense names, guess i may have to create (GM) families to host these guys, what do you think?

  7. #7
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    11:38 AM
    Yeah, sadly I think this is one of those cases where the API is locked down compared to what buttons are available in Revit itself.

    Nesting into a Generic Model would indeed be one approach. Or depending on what you need - you could make a dictionary?

  8. #8
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    850
    Current Local Time
    03:38 AM
    what do you mean of "make a dictionary?"
    in fact, i just want to get rid of all those non-sense "category" names when for instance selecting/filtering in Revit project

  9. #9
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Location
    London, United Kingdom
    Posts
    612
    Current Local Time
    11:38 AM
    Hello Ning,

    With Dictionaries you can associate a key to a value. In your case, you can call your non-sense names of Rooms a proper name - and then simply refer to the object via a dictionary call on the key.

    Concept shown below:



    What you are doing with a Dictionary is creating a Key : Value pairing, where you can use that key to get the value. Values can be objects, strings, numbers - anything! Key has to be unique, but values can be the same.
    Attached Thumbnails Attached Thumbnails rename importinstance (type)-dictionary.png  
    Last edited by amoursol; January 23rd, 2018 at 02:10 PM.
    josephpeel likes this.

  10. #10
    Senior Member Ning Zhou's Avatar
    Join Date
    July 20, 2011
    Posts
    850
    Current Local Time
    03:38 AM
    cool, i used dictionary quite a lot in c# coding for Revit API, but never used (or figured out how to) in Dynamo, for this particular case, don't know yet how to apply your idea, the problem is all that non-sense names are actually Revit "category" not "subcategory", even after rename its type, see JPGs (before and after renaming)
    Attached Thumbnails Attached Thumbnails rename importinstance (type)-capture-3.png   rename importinstance (type)-capture-2.png   rename importinstance (type)-capture_1.png   rename importinstance (type)-capture-4.png  

Page 1 of 2 12 LastLast

Similar Threads

  1. Rename family type
    By wave in forum Architecture - Family Creation
    Replies: 14
    Last Post: September 4th, 2016, 12:04 PM
  2. How to rename Drafting View 'Type' in API
    By RipJust in forum Third party Add-Ins, API and R&D
    Replies: 3
    Last Post: July 9th, 2015, 12:23 PM
  3. ImportInstance.ByGeometries DynamoBIM Node explained
    By Simply Complex in forum Blog Feeds
    Replies: 0
    Last Post: February 15th, 2015, 04:16 PM
  4. Rename shared parameter
    By kowen1208 in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: February 24th, 2014, 03:56 PM
  5. 2010 : Get link of ImportInstance
    By pierrenavarra in forum Third party Add-Ins, API and R&D
    Replies: 1
    Last Post: November 2nd, 2011, 03:43 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
  •