Below grade levels

I have been learning revit for my company and trying to get things set up for us to use as our primary program. Now I have gone through quite a few tutorials and found one that sets up your revit file through a dynamo script. Where I am having a problem is I want to know is there a way to have dynamo add a level that is say at -1’-0". The method of making revit add this information is pulling data from an excel sheet. I have tried just making the imput a negative number but I am not sure why it wont add them. Anyone know what I might need to do?

This is the script I am running to add things to revit. Any pointers would be helpful

what does the top yellow error say? (hover with mouse to reveal)

And perhaps the name of your levels as well Characters \ : { } [ ] | ; < > ? ’ aren’t allowed

The problem was it was adding an extra line as null because it was looking for 5 lines from excel when I had 4. Fixing that it removed the warning but still would not add levels below 0’-0".

Try and read this and then rework your original post :slight_smile:
This will make it a lot easier for anyone attempting to assist you.

The problem I am trying to fix is I want to run a dynamo script that auto populates elevations, levels, sheets and any other information that is always needed for new jobs but might be slightly different. I have the script running fine until I want to set a levels elevation to be negative, or below 0’-0" being our finished floor. When I run the script with any negative value it will populate all other information but dose not add the negative ones. I am not sure if I need to add a few more nodes in dynamo or would I need to add the negative levels by hand.

It sounds as if you’re getting into too much too quickly based on these two items:


First build a graph that just creates the levels via an excel sheet. If you can’t get that to work, post the DYN, and all the relevant content here and I am sure the forum will gladly help you out.

As it stands, we only see one error, which you claim to have resolved, and no previews so we have no idea what/where/why the issue may stem from.

That said, the level by name and elevation should accomplish everything you’re after with no need to ‘set’ the parameter values. My guess is that you’re feeding a string instead of a number based on what you’re describing. Try building the graph to just make levels as I noted above, with the excel file only feeding the following elevations: -10’-6", 15’-6", 30’-6" (or -3, 5, 10 if you’re using meters). If you see elevations at 10.5, 15.5, and 30.5 ’ then you know it’s a string not number issue.

So for the script so the image in the first post is my script and it works for if I use all positive numbers. I get the script from a tutorial and so now I am trying to tailor it for our companies needs. I am also putting in the number in as decimal form so dynamo and revit dont need to convert anything over as I know excel dose not always like normal dimensions. When I get into work tomorrow I can try giving the elevations in ft and inches but not sure if dynamo will convey that information correctly.

FWIW, I just recreated the content to make levels from an excel file, and it works fine (note mine is built in Dynamo 2.0).

Can you share the excel file which creates the level at the wrong elevation?

So I am using dynamo core I think seeing your working pathes I see a difference. You have Data.ImportExcel. I have in that same slot Excel.ReadFromFile, I am not sure if that is what is causing me problems with my script for what I want it to do.

it might be that if the excel node finds whole numbers it passes them on as whole numers, where decimals and negative values may be interpreted as a string, use the number from string node in that case to convert to numbers

This is because you’re in Dynamo 1.x, while I’m in 2.0.2. Upgrading to 2 is something I recommend at this time, but there will be slight variations if you follow older tutorials.