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

Results 1 to 8 of 8

Thread: GetValues from locked object

  1. #1
    Junior Member Bogey1977's Avatar
    Join Date
    July 12, 2018
    Location
    Nederland
    Posts
    29
    Current Local Time
    04:29 AM

    GetValues from locked object

    Hi all,

    Is it possible to get info from an aligned and locked object?

    To make it more clear:
    I have a recess (Generic Model) in a wall
    I aligned (and locked) this recess to a pipe

    Is it possible to write the "System Type" from this pipe to a parameter in the recess?

  2. #2
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    319
    Current Local Time
    05:29 AM
    Clockwork has a Geometry.ClosestTo Node, that should do the trick to relate your recess Family instance to the right Pipe instance. From that Pipe you can get the System Type and push that to the recess. Depending on the size of your models I would like to pre-filter the pipes that the recess could belong to to improve performance (for instance: sorting by Level, Space of bouwdeel first)

  3. #3
    Junior Member Bogey1977's Avatar
    Join Date
    July 12, 2018
    Location
    Nederland
    Posts
    29
    Current Local Time
    04:29 AM
    Bjorn,

    Thank you for your response, but still not getting it right.
    "Geometry.ClosestTo" get's the object closests to a certain point (regardles if the objects are constrained to eachother)?

    Underneaut a crop out of my Revit-project (4 pipes and 2 resesses):


    Underneath a crop out of my dynamo-script:


    Dynamo missed something, or needs another thing. Any help?

    Another thing, if recess family isn't constrained to a pipe, then the parameter where systemtype wil be stored has to contain something like "Not Constrained!"
    Attached Thumbnails Attached Thumbnails GetValues from locked object-sparing_dynamo.png   GetValues from locked object-revit_dynamo.png  

  4. #4
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    319
    Current Local Time
    05:29 AM
    You are feeding elements into an input named geometry. The error message is probably telling you this.

    Turns out the ClosestTo Node also return geometry, not elements. So you might want to look at things like these:
    GetValues from locked object-2019-03-12_1427.png

    Also check the BiMorph Package for Intersection methods with very good performance rates.

    The constraints are a lot harder. I found a make New Alignment Method, but not a checking method in the API.The constraints are also never made to an element, but rather to a reference of an element, so checking if they are set properly is harder than you make it sound.

  5. #5
    Junior Member Bogey1977's Avatar
    Join Date
    July 12, 2018
    Location
    Nederland
    Posts
    29
    Current Local Time
    04:29 AM
    Thanks Bjorn,

    I think I am gonna park this issue for another time.
    I have A LOT to do here, and this takes to much time at the moment.
    It's not something really nessecary but I think it wil be conveniant in some situations.

    So I deffinetly come back to this one in future.

    Thanks for your help!

  6. #6
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    319
    Current Local Time
    05:29 AM
    GetValues from locked object-recess_interference.png

    Got stuck without internet yesterday, but this should do it, without the constraints.

  7. #7
    Junior Member Bogey1977's Avatar
    Join Date
    July 12, 2018
    Location
    Nederland
    Posts
    29
    Current Local Time
    04:29 AM
    I missed this one!!!!
    Thank you Bjorn, going dive into this one

  8. #8
    Junior Member Bogey1977's Avatar
    Join Date
    July 12, 2018
    Location
    Nederland
    Posts
    29
    Current Local Time
    04:29 AM
    Thanks again Bjorn!
    It works like a charm!!!!

    Only thing I need now is to look to your code and see what it is doing exactly.... cause I don't like if things work, but I don't know what happens! haha

    Going to use pieces of your code to write other information to other parameters.

Similar Threads

  1. RTC: DJI Phantom 4 – Locked on Target
    By RTC in forum Blog Feeds
    Replies: 0
    Last Post: March 15th, 2016, 02:15 AM
  2. RTC: Locked and Loaded!
    By RTC in forum Blog Feeds
    Replies: 0
    Last Post: September 9th, 2015, 07:45 AM
  3. COBie Data Drops error - "Object reference not set to an instance of an object"
    By jana.honkova in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: February 9th, 2015, 08:13 AM
  4. Standard Library Locked
    By Shields08 in forum Architecture and General Revit Questions
    Replies: 10
    Last Post: August 1st, 2013, 08:45 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
  •