Author Topic: Writing back into elements with Dynamo  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Writing back into elements with Dynamo
« on: Mar 04, 2022, 16:02:21 PM »
So I have worked up a dynamo script to take my Unistrut hangers and round them up to the next even dimension.  It is great to see this, but I would love to know if there is anyway I can use Dynamo or probably Python, to write this new dimension back into the hanger so it would adjust to the new rounded off dimension? 
"If you think education is expensive, you should see what ignorance costs you"

Offline PipeFitter72

  • Full Member
  • ***
  • Posts: 108
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #1 on: Mar 04, 2022, 16:22:07 PM »
Fabrication package lets you write back dimension by index value
Union CADD Database Administrator

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #2 on: Mar 04, 2022, 16:27:57 PM »
Thanks so much for the quick response.  This looks promising. 
"If you think education is expensive, you should see what ignorance costs you"

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #3 on: Mar 07, 2022, 19:29:53 PM »
Wondering if you guys see this at all?  When I model a Unistrut trapeze all the dimensions appear good except these rod offsets come in at this crazy long number..  Always the same number.  I checked my itm in my database and these fieldsare set to SAME and  AUTO.  Seems to work fine until recently.  Any suggestions??
"If you think education is expensive, you should see what ignorance costs you"

Offline edsharp

  • Full Member
  • ***
  • Posts: 240
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #4 on: Mar 08, 2022, 01:51:29 AM »
instead of auto .... set it to a number ... we use 1" .and strut extension @ 2".. i am not a fan of ''auto'' for anything in fab ... most of the time i dont know how it figures auto

just a suggestion
« Last Edit: Mar 08, 2022, 11:34:28 AM by edsharp »

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #5 on: Mar 08, 2022, 13:43:08 PM »
Thanks for the suggestion.  I was going to give it a try and see if this works out better.  It just seemed weird that this has been working for us in Revit up until just lately.
"If you think education is expensive, you should see what ignorance costs you"

Offline Axl

  • Full Member
  • ***
  • Posts: 126
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #6 on: Mar 08, 2022, 14:22:08 PM »
I usually have very long lengths when there is no structure at the top of the hanger, maybe you can check that
CADmep DB Manager
Content Manager
Scripting

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #7 on: Mar 08, 2022, 17:38:21 PM »
Thanks Axl.  I will test that for sure.  These hangers did not have structure above so you may be onto something here....
"If you think education is expensive, you should see what ignorance costs you"

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #8 on: Mar 09, 2022, 19:08:35 PM »
instead of auto .... set it to a number ... we use 1" .and strut extension @ 2".. i am not a fan of ''auto'' for anything in fab ... most of the time i dont know how it figures auto

just a suggestion
I did as suggested and changed the offset values of my .itm in my database to actual dimensions.  I used 1" for both and this seems to have cleared up the issue.  Thanks for the advice.
"If you think education is expensive, you should see what ignorance costs you"

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #9 on: Mar 09, 2022, 19:15:02 PM »
Fabrication package lets you write back dimension by index value
I have no doubt that this node is just what I need to feed the new rounded off dimension back into my Unistrut hanger.  As I understand this, the  DimValue would be the new dimension I am looking to insert, the FabricationPart would be the element I am looking to insert it into, and the DimIndex would be the index number of the FabricationPart in the list I am looking for?  I am kind of stumped as to where I would output this node to?  Or am I way off here.....
"If you think education is expensive, you should see what ignorance costs you"

Offline PipeFitter72

  • Full Member
  • ***
  • Posts: 108
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #10 on: Mar 10, 2022, 20:04:52 PM »
You do not need to output the node to anything. It adjusts the part that is input. the output could go to a watch node to show the element, or pass the element on to another node if needed.
I am using it in this example to adjust the length of pipe stubins.
It will add the length of the stubin, weld, and piece of pipe beyond the weld together.
It then adjusts the length of the stubin to match, and deletes the weld and extra piece of pipe.
Thas way we do not wind up with a stubin, and a short piece and having to make an extra weld.
Union CADD Database Administrator

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #11 on: Aug 16, 2022, 16:50:35 PM »
Pipefitter72 - That is a great use of Dynamo.  I can see where that could be handy.  So when you run this script, does it actually alter the items in the model or just change the parameters reported?
"If you think education is expensive, you should see what ignorance costs you"

Offline PipeFitter72

  • Full Member
  • ***
  • Posts: 108
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #12 on: Aug 16, 2022, 16:53:28 PM »
it alters the length of the stubin in the model, and deletes the extra pipe, and weld.
Union CADD Database Administrator

Offline PipeFitter72

  • Full Member
  • ***
  • Posts: 108
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #13 on: Oct 03, 2022, 16:30:26 PM »
In reply to your message:

In reply to your message:

Use the dropdown under Fabrication dimensions node, to check your indexing.

Also I always set my bearer to rectangular. if set to round, it does not want to adjust the width.

using CID 1238.
Be aware somethime changing bearer type or other options can change your indexing.

Union CADD Database Administrator

Offline bitterfitterTopic starter

  • Senior Member
  • ****
  • Posts: 450
  • Country: us
  • Gender: Male
Re: Writing back into elements with Dynamo
« Reply #14 on: Oct 03, 2022, 18:03:47 PM »
Thanks again for the information.  I am hesitant at looking at the #1238 pattern as I thought there were still issues with this CID?  see this topic here : http://www.xtracad.com/forum/index.php/topic,17005.0.html

I am about to try some testing but I was hoping someone can tell me if the "SetDimensionValue" node in dynamo works with the 838 CID?

"If you think education is expensive, you should see what ignorance costs you"