SpotElevation.ByPoint node, curious results

Hi all,

I have completed my script which places spot elevation tags at the underside of piping. I now just have one more issue to resolve and I cannot figure it out.
I have split the last section of this data stream into two… One SpotElevation.ByPoint node for the start point, and one for the end point.
As you can see from the image below, all the end points get tagged correctly.
All the start points just receive a null value.
I have checked everything starting from the beginning of the script and all list levels and data structures are exactly the same. Can anyone give me a suggestion of something to try to fix this? Or perhaps someone knows what the issue is?

The start and end points come from a curve which i got from the Element.Location+ node. I translated this curve down by the values i required and then got there start and end points.
I can see that the data is correct in Dynamo and it’s exactly what I want, its just not showing up in Revit.


As you can see, only the pipe end points come through.

Any suggestions would be appreciated, thank you!

Hi,

I agree that what you are seeing is surprising, from what I can see it all looks correct…

But, given that you are demonstrating that the process can work, I would say we just need to work through a step at a time and find the little part which is going wrong…

What I do in these situations is give everything a tidy up, make all the flows of data really easy to read, then see if something has been plugged in slightly wrong… It will also help ‘future me’ understand what I built when I come back to it in 6 months time :slight_smile:

Hope that helps,

Mark

Hi Mark,

Thanks for your response!
I agree, the problem is, this is where I am right now. I have already gone back and looked at everything and cleaned it up and I am still getting this error :sweat_smile:

Not really sure what to do now… But I’ll keep trying.

Hi,

Could you drop a bigger extract? With the tidying?

If you just plug the points from the Start into the functioning node, does it work? That would identify there is something amiss in the top stream…

Cheers,

Mark

Hi Mark,

Sure, I will give a run down of the start to finish, maybe you can spot something.
All I have done up till the image below is separate the piping into two types, those with insulation, and those without.
I split those two stream up and deal with them separately, so this is just dealing with the piping that is insulated.

After this image, you can refer to the first Dynamo image that I posted, as that is the next step.

If I swap my start point and end point list around, the top node works and the bottom node doesn’t…
It’s almost like it doesn’t like the startpoint data stream…

Any ideas, or any more info you need?

Thanks,

It is super wierd :slight_smile:

I expect that one of your runs was drawn left to right, whereas the others were drawn right to left (or visa vers)a, so you ended up with one point the opposite of the others…

I would probably have a look inside the custom node, probably copy the python out to the main graph… That will hopefully give you more information about the error…

How about if you join the list of points together, does it make anything?

All the runs were drawn left to right, I made sure of that because I thought the same thing :see_no_evil:
If I join the lists together I get exactly the same results.

The curious thing is that I can see the points that have been created in Dynamo as well as Revit. They are there and they are visible… They just aren’t getting tagged.

Python I wouldn’t be able to understand too well unfortunately…
But I can see that there are two inputs inside the custom node definition which are not available in the project space? Don’t know if that could be anything?

If you bring all that into you main graph, you can run it and see if there is an error in the python node…

If I am doing this correctly, it says line 26 is the error

I don’t know what this means unfortunately… I also don’t know how the ViewPlan type can be a problem, as it is working for half the points.

If you read the python, in line 26, view = views[i], if you look up, views = unwrapelement(IN[0])

but you’ve plugged points into IN[0], not a view…

I did see that and I tried switching the inputs, when I switch the inputs I get nothing and this error appears.

Did you add the ‘to List’ node? I think python is telling you that it’s not a (kind of) list…

I added the ‘to list’ node and get the following error.

I know that this value here is a default 3D view:

It’s still half working on floor plans… So I’m not quite sure how to fix this…

Some revit api commands require a 3D view for no logical reason. You’ll still need to put in your plan view in the correct input so it knows where to put the annotations.

Didn’t know that, thanks for letting me know!

Is there anything in the code that can tell me what I need to do? I am still very confused as to why half of it is working and half isnt.

Hmm… So none of the start points are working? but all the end points?

Yes that’s right, didn’t actually think of it in those terms, but yes. No start points, only end points.

A point might be being considered as a vector under the hood, which might be set in a way which can’t generate the new label… Just a guess… How about if you extract the X, Y and Z from the start points and build new points from them?

I have recreated the points as suggested, as well as creating lines and extracting the points from the curves. Nothing is working :frowning:

I have managed to simplify my graph with all this testing, but still no solution to this.