Need Help With Python Scripting

Hello All -
I am very very new to Python, such as I am going through the course at codecademy. I found this blog by @maarten vroegindeweij, and thought it was trying to do the same thing I am trying to do with a floor slab. It works! However, the dimensions are not for just one side of a slab, they are also dimensioning any changes on the opposite side.

I am trying to set it up so I can dimension each side of the slab that I choose, and tried using the Select Faces as well as Select Edges node but no luck.
I was wondering if anyone out there had any suggestions on how I could either tweak the graph, or the python code.

Thank you any help is appreciated. I have been trying to work out an auto dimension for slab edges for months now.


Hi…welcome to python. I just want to asked if you do select a line? On a specific side?

yes, I have placed four detail lines, one on each side and then select the one on the side I am trying to dimension

You have 11 edges? Correct on one side? Where you select the detail line reference?

sounds about right

Python looks alright i need to check on a pc? For the meantime can you do a simple slab and place the line on one side only and run graph (i think you done this already dont you?)…it appears to me also that the location of the for element in elements maybe in the wrong location coz of this its remembering your previous selection.

yeah I have already done that. So if the script is fine, I am assuming it has to do with the graph and suing the edges node.

If you post your dyn so others can help for the meantime i am not on a pc at the moment and it will be tomorrow before i can help as its night time here in my part of the world. I think if you just create a simple slab with manually selecting an edge (there is a node for this OOTB i just forgot the name) and try your python. Also i can see you have IN[2] do you not get an error?

I had there in there testing something, but it didn’t work. Here is the dyn file.Dimensional Floor-online edit.dyn (19.8 KB)

1 Like

Did you try this post it looks like it has been resolved and the code was posted…