Can I make custom error messages?

I’ve made myself a pretty bulky script for generating floors by specific conditions and/or inputs.
I’ve got everything running pretty much the way I need it to, but in some test projects I’ve found that room boundaries aren’t always flawlessly extracted or defined, which causes some floors not to generate.

I’ve made the script so that it doesn’t influence the other floors, but I’d like to return an error message to the user in case the Floor.ByOutlineTypeAndLevel node returns a null value. It already returns a warning in dynamo stating one or more of the Polycurves are not closed, but I want to push that to dynamo player users.

Thanks in advance,

Jonathan

1 Like

you do need to share some portion of your graph, upload the whole graph, provide screenshots, etc otherwise you will not get much help.


Not sure if a picture would say much more, but here is an example of my problem. I generate my floors, first and foremost based off of room boundaries. The problem is that room boundaries, for some unknown reason have a chance of not forming a closed loop aparently… Every time this occurs the Floor.ByOutlineTypeAndLevel node outputs a “null” value.
What I want to know is how I can create an error message when a null value pops up. So that I can let the user know they’d have to draw that specific floor manually
If I google around I only find people trying to solve error messages instead of creating them (which is pretty normal I guess, but that doesn’t help me with my problem) :s

Hey,

Kudos to @jacob.small

Also, i don’t know how you’re getting the room boundaries, but these give me the best results…

Hope that helps,

Mark

3 Likes

The answer provided by @Gui_Talarico is actually one of my most used reference posts on the forum. All credit goes to him. :smiley:

1 Like

Thanks, for the link :slight_smile:
I’ve literally just used the Room.FinishBoundary node to get my curves. I’ve seen this problem on a couple of occasions and I can’t figure out why. I never customized the room boundaries in the projects I tested with either, so thats not the cause :confused:

It does seem to be something which comes up time and again.

I have tried all sorts of methods, there is a node called archi-lab super join (i think in Chinamo?), rebuilding curves from points, sorting by angle, but none of them are bullet-proof.

I guess that Revit must have a sophisticated method of defining a room boundary which we don’t have access to.

That method would be useful in all sorts of situations where the messyness of real life creates dis-junctions which are hard for Dynamo to solve.

Hopefully some genius will create a super-super-join node in the near future.

Mark

My guess as to why the error occurs: you have a donut shaped room - that is a room with an opening in the middle of it.

Maybe…

My guess is that there’s a column with a bit of wall round it next to a wall that’s split with a door across the split and the wall is joined to a lining and has an embedded curtain wall with a custom profile all of which is in a group :smiley:

1 Like