DYNAMO BASIC HELP PLEASE

DYNAMO BASIC HELP PLEASE

CLMSJ
Advocate Advocate
4,328 Views
27 Replies
Message 1 of 28

DYNAMO BASIC HELP PLEASE

CLMSJ
Advocate
Advocate

Hi,

I have created a dynamo script that gives x and y coordinates to piles in my revit file. These values then appear in the schedule as shown in the screenshot. How do i convert it to show as metres and to only 3 decimal places?

 

Someone else told me to use math nodes but i am new to dynamo and not sure how to use them. Any help would be much appreciated or a point in the right direction on how to use basic math nodes.

 

CLMSJ_0-1635263677597.png

 

0 Likes
Accepted solutions (4)
4,329 Views
27 Replies
Replies (27)
Message 2 of 28

rodrigo.bezerra
Advisor
Advisor

If MSJ-X and Y are shared parameters design to receive number information, you don't have to tackle decimal places in Revit: just adjust the unit settings for the parameter in the schedule.

Rodrigo Bezerra

EESignature

Message 3 of 28

RDAOU
Mentor
Mentor
Accepted solution

@CLMSJ 

 

You can do one of the following:

  1. either Change project units (Length to meters) run the graph then Change the Project units back to millimeters (Then repeat this process every time you want to update the coordinates. which is pretty much tidious and could end up with a mishmash of mm and m)
  2. OR you can leave the project units be (in mm)  and do the conversion of the coordinates to m simply by dividing the output by 1000!!!

RDAOU_0-1635270919848.png

 

DYN Attached

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 4 of 28

CLMSJ
Advocate
Advocate

Excellent! thank you! How do you make it round to 3 decimal places only using dynamo? (many thanks for the screenshot of dynamo, helps a lot!)

0 Likes
Message 5 of 28

RDAOU
Mentor
Mentor

@CLMSJ 

 

The Code block highlighted below is what controls the rounding ... it is set to 3 Digits as it is now

 

RDAOU_0-1635326828821.png

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 6 of 28

CLMSJ
Advocate
Advocate

Yeah i have got that in, but as you can see top right in the schedule, there is still 10 decimal places?

 

CLMSJ_0-1635327338855.png

 

0 Likes
Message 7 of 28

RDAOU
Mentor
Mentor

@CLMSJ 

 

Works fine here... try remove the project parameters and add them back

 

RDAOU_0-1635328480924.png

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 8 of 28

CLMSJ
Advocate
Advocate

Still not working for me? is it because the parameter is set as a text parameter?

 

CLMSJ_0-1635331698466.png

 

0 Likes
Message 9 of 28

RDAOU
Mentor
Mentor

@CLMSJ 

 

Nope ...text has nothing to do with that...if you are using the same revit file you attached, the numbers in the image you posted are wrong

 

  1. Did you delete and recreate the Parameters and added to structural foundation?
  2. In the DYN add  a watch node as shown below. this will show you the figures which should be in the parameters

RDAOU_0-1635332156957.png

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 10 of 28

CLMSJ
Advocate
Advocate

Yes im not sure what i have missed here?

 

CLMSJ_0-1635332714910.png

 

 

0 Likes
Message 11 of 28

CLMSJ
Advocate
Advocate

revit file attached

0 Likes
Message 12 of 28

RDAOU
Mentor
Mentor

@CLMSJ 

 

Well nothing wrong in the files you attached...See GIF below.

  • Make sure you are running the graph in the right Revit model

 

Pile Coord.gif

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 13 of 28

CLMSJ
Advocate
Advocate

Very strange it isnt working my end 😞

 

Maybe there is a dynamo or revit update i need to do

0 Likes
Message 14 of 28

CLMSJ
Advocate
Advocate

There is a few updates i need to do so hopefully will sort my problem.

 

One other thing i am wondering with this auto coord dynamo script is that it works from the internal origin of revit? if thats the case, when i loads in a CAD survey file and relocate my survey point in revit so it matches the survey grids of the CAD file, will that mean the dynamo script will not work?

Message 15 of 28

RDAOU
Mentor
Mentor
Accepted solution

@CLMSJ 

 

The survey point is not relocated... What gets relocated is the Internal origin and the Project base point...the survey point remains put  Sea Level 0,0,0 

 

If you need to relocate the survey point for it to serve as a site benchmark, you

  • first UNCLIP it
  • Relocate
  • Then Clip it Again at the new position 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 16 of 28

CLMSJ
Advocate
Advocate

Hello again! nearly there! I managed to get the coords working by upgrading it to revit 2020 from revit 2019. The issue im having now is moving the survey point. I have linked a CAD file in and when i click aquire coordinates from the cad file, the survey point shoots far away (which it should) and i can put coordinates tags on the cad file and they show the correct real world coordinates. However when i run the dynamo coord script again, nothing changes and i think it is because it is reading from the revit internal hidden main origin? is there a way to get around this?

 

CLMSJ_0-1635350757463.png

 

0 Likes
Message 17 of 28

CLMSJ
Advocate
Advocate

Image of coords after i have aquired coordinates from the CAD file

CLMSJ_1-1635350950795.png

 

0 Likes
Message 18 of 28

CLMSJ
Advocate
Advocate

Any help on resolving this coord issue would be much appreciated, i am nearly there with it now i just need to coords in the dynamo script to read from the survey marker and not the internal origin, if thats possible?

0 Likes
Message 19 of 28

RDAOU
Mentor
Mentor
Accepted solution

@CLMSJ 

 

The OOTB way is to transform Geometry of the piles from the one cs to the other (ie: from Base Point or IO to Survey)

 

Alternatively, if you do not want to do a complete makeover to the Dynamo graph you are using already, Download a package called Genius Loki which has the following node. 

 

The revised .dyn is also attached

 

RDAOU_0-1635778084473.png

 

RDAOU_1-1635778382060.png

 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 20 of 28

CLMSJ
Advocate
Advocate

Brilliant, thanks so much! i will test this out when i get some free time 🙂