As you can see your solution would only work if elements with the specific type have already been placed in the project.
But i have found the right way to get the spot elevation types
Amazing, it is just tricky to get the right points to place the SpotElevations!
But now i have another problem, in some of my Revit-Project placing spotelevations with dynamo does not work! Not in Planviews and not in SectionViews…I get no error, just nulls as result and I´m not making any mistake, manual placing the SpotElevations works fine so they are not hidden or something.
I don´t know what could be the problem…any thoughts on that?
So after more testing i have to give up on this. I thought removing this reverse.vector node is the solution to my problems but it is not. I have no idea why the placing works perfect in a new created project, but not in my existing projects. And then, in 5% of my tests it works for a few points.
Would really appreciate help if someone has more information on this topic, has ideas what could be the problem or would try to test in his projects.
I will dig into it. At our office, we typically start all of our projects from the same template; it may just be the trick to get the script to work just once, then it will run right every time.
I was referring to the python post above, but it was able to place some spot elevations with the one in clockwork already.
As far as results, I am getting some very strange behavior.
I tried running the node in a section view of a wall and some floors. Depending on where I pulled the point from within the depth of the view, I managed to get one or two of the spot elevations to show up for the bottom of a floor.
I haven’t yet been able to pull of getting all floors at once. Sometimes I get one point’s elevation, sometimes I get a different point. Other times I don’t get any. It depends on where the point is within the depth of the view.
What is interesting is reference of the spot elevation; it is picking up the wall, not the floors.
This hosting behavior is strange because you cannot manually place spot elevations just anywhere on a wall in a section. Revit simply will not let you.
I wonder if it would help if you could feed in the elements that you want to place the spot elevations on.
I also get different results when I pull out the Vector.Reverse node. Different points will get spot dimensions and others will not anymore. Unfortunately, the successes and failures do not completely reverse as well, so it’s hard to find a direct correlation that helps fix the problem. Some other issue is at work here. I wonder if there is a relationship between the view direction vector and how far a point is placed inside the element being tagged.
Shouldn’t it just be possible to plug a point in that is already in the right place?
Why do you need a 3D view to find the right reference?
It may be helpful to plug in the reference element directly. If you want to automate a spot elevation in a section, I would think that you would already know the element that you want to reference. Either way, there’s not a whole lot of code in this script. I suspect that the issue is in that section.
Those references are for the planes in the family. I’m not sure if you can even dimension to those manually. Maybe? We might get lucky though if we feed in the edge references instead. I think there’s a post on this forum about that somewhere