Dynamo script not working on larger project

Hi All,
I have just started playing around with some Dynamo scripts and I got it working fine to renumber doors (Mark) based on the Room Number (modified script but based on this Tutorial:
[https://parametricmonkey.com/2015/06/21/renumber-doors-by-rooms/]
However, while it works on small test project files it does not do anyhing on an actual larger project.
Can anyone please comment on this?

Thank you.

How does it not work?

As I said it does not do anything. It runs for 4 seconds on the Dynamo Player without having renumbered any door once it finishes.
However, in a quick test project it works fine.

I have attached the dyn files.
Thank you very much for your help, Jacob.

Renumber - Doors - (2) Run second - Remaining Doors .dyn (8.8 KB)
CCN_RenameDoorsByRoomWithFilter.dyf (155.5 KB)

I don’t have the larger project so I can only guess, but you can at least check each of the following. Note that you’re unable to see which of these it is due to running via player and the custom node current configuration.

  1. Different Revit versions in the two projects. the selection of the doors is being done by ‘all elements of category’ and using the category drop down to configure it. The value of the drop down can change between Revit years as new categories are added often. Edit the custom node to use Category.ByName instead to avoid this pitfall.

  2. You are Filter out all the doors at some point along the line. Can’t tell which, can’t tell why until you move the contents of the custom node into the main graph and watch the excluded data there.

  3. The method which you are selecting the rooms is not valid as items are nested across links. I am not sure that the node you are getting the rooms each door goes to/from works across links, and the simple project is less likely to have such a problem where as the complex one is likely. Check method is the same as #2 - pull the custom node contents into the file itself.

If all of those fail, upload the file or recreate the file’s conditions exactly as they are (phasing, link structure, etc) and I’ll try and have a look.

Thank you very much for your input, Jacob.
I have tried your suggestions but they do not solve the problem.
I have attached two screen grabs that show where the script fails (simple vs complex project file).
Maybe this helps you figuring it out, otherwise I can upload the complex file too.


post scriptum:
My simple project file is one apartment level copied out from the complex file and repeated over 3 levels.

It’s likely something related to the family, room boundaries/levels, phases or link setup, but nothing I can see from what you provided. What room do they schedule as being to/from in the project?

Hi Jacob,
sorry for the long wait but I was busy on other projects.
I have uploaded the dyn file.
Could you please have a look?
I got an Autodesk support person to review the script but he was not able to work out why it does not work consistently…

Cheers,
Jan Usinger

Renumber - Doors incl filter ENTRY door.dyn (327.7 KB)

Can you provide me the case number from when you reached out to support? Might save me some work.

Also I’ll need a Revit file who’s structure matches the file you’re working in, including link methods and such.

Thank you for your quick reply, Jacob.
I have uploaded everything you need to the Autodesk server already.
The case number is:
# Case ID: 15186335

Thank you very much.

Hi @jacob.small @Back2b

I have rvt files. @jacob.small I hope we find time to discuss this issue.

Just a couple of thoughts if you haven’t had them already… :slight_smile:

Maybe check all your families have ‘to and from rooms’ activated? you seem to be getting entirely nulls from there?

The other input is phase? Maybe check your custom Phase node is returning correctly? If that is set to active view, then maybe your view isn’t in the correct phase (for example sheets don’t have a phase?)

image

Hope that’s of interest…

Mark

I played with phases and in large project I got following warring

*Warning: Geometry.ClosestPointTo operation failed. *
Unable to make wire from edge body : WIRE_SELF_INTERSECTS2 – Wire has self-intersection

At least it runs then :smiley: progress… I presume you defined the phase more explicitly… image could you show the nodes around the ones with the new error? Everything expanded would help…

Those kind of errors tend to occur when creating a polycurve from a room with a complex boundary… Like here?
image
This node is the best I’ve found…
image
But Room.FinishBoundary might be worth a shot? Or can you extract a Solid in a different way? (Bounding boxes are very robust)

Here’s my version, it’s working a bit differently but you might find it useful…

Hope that’s of interest,

Mark

1 Like

Thanks @Mark.Ackerley

@Back2b please check if it works also for you.

Thank you @Mark.Ackerley Mark, for posting your script.
Unfortunately, it does not work for me as it breaks (warnings) on multiple nodes.

@jacob.small, @pawel.romaniuk
Did you have a chance to look at my script?

What kind of nodes please share with us more information.

Hi Pawel,
I don’t want to get sidetracked with Mark’s script as my initial question was how to fix my own script - not Marks.
Besides, I find his script too complicate to follow as I am new to Dynamo.
Did Mark’s script work for you?

Hey @Back2b,

Did you try my suggestion in post 10?

Did you find that fixing the View Phase fixed your initial problem?

@pawel.romaniuk found his next problem was due to intersecting wires… My graph also had to deal with that problem, the part which might be useful in this error is here…

Though subsequently I’ve actually found this node to be more reliable than patching and extruding…
image

I did not expect that my graph would replace @Back2b’s, as I noted, I included it for reference as it likely has to deal with lots of the same issues (some of which may not be obvious yet).

Hope that’s of interest,

Mark