Room is not iterable

Does this indicate a problem with the node i’m using or (more likely) the way I am using it?

Can you show data going into the inputs? Are they all lists, and are they the same size?
If they are not all the same size you might need to change the lacing mode.

They were (and still are) lists, but were not the same size. I tried all the lacing options, and none of them resolved the error, so I added some list cycling so that the lists are now the same length - still not quite working
This is what it looks like at the moment - lacing on the “Create Annotation Tag” is set to shortest for this screenshot. Setting it to longest or cross product generates teh “room is not iterable” error from the original post

And, I posted the file here, if you want to open it
https://dl.dropboxusercontent.com/u/46958297/Dynamo/CACreatePlans_V04.dyn
I can post my the models if they would help (there is a whole view type thing going on, so the script depends on having those view types in the model)

(You might recognize this as a later version of a script you already commented on)

Ooh,just spotted a mistake - I needed one more list flattened. Doing so helped a lot, But…
It still doesn’t create the room tags, it just adds blue dots

Hi @cprettyman

Try using “Flatten” node after “List.Cycle” node and connect.

@Kulkul
I think i was adding that flatten as you typed- see my second reply
and, thanks!

@cprettyman make sure your link files has only one room placed in each area. Check your link file.

@Kulkul
The test file does have just one room per area (the great thing about test files, you can keep them clean).

Multiple rooms, unenclosed rooms, missing rooms, etc are a concern. We’re always working with someone else’s models, and the quality of their modelling is out of our control. Among other things, we sometimes get separate architectural and interiors models, both of which have rooms, and we end up with 2 or more tags in every space, sometimes with different names and numbers.

Looks like you are getting closer @cprettyman
based on the output you are showing, the room tags are being created, but maybe it’s not setting the right type, or it’s placing them in the wrong view… can you search by those element IDs and see if you can find a tag in the model?
Make sure you check all the basic visibility issues (view template, active workset, etc) to make sure the new tags are not just hiding from you.

Thanks @Gui_Talarico

Isn’t always the last little bit that is most frustrating

  • I had checked all the view templates before posting, but to be extra sure, I manually tagged one room in each plan to confirm that tags are visible - they are.
  • selecting a tag and then “select all instances in entire model” finds only the tags I placed manually

Selecting by object ID selects them, but I still can’t find them. I suspect that the “TotalTransform” property mentioned in the later part of this thread could be the issue.
http://dynamobim.org/forums/topic/room-tagging/
I’ll see if I can figure that out.

I stripped your definition down and used just the active view and all rooms in model using Room Collector,
worked fine here.

The Dynamo points you are seeing show the location you are feeding in is correct.

This is really looking like a visibility issue, or there is something off with the views you are feeding.
I would suggest you try creating a new plan view with no template, make sure your active workset is visible,
and plugin just the active view to make sure everything else works so you can isolate the issue.

roomtag.dyn (9.1 KB)

1 Like

@Gui_Talarico

The results of some testing

Test 1
One file, created from Revit imperial default template, no view templates, no custom plan types,
Succeeds
At least, it looks like it succeeds, see more below

Test 2
One file, created from Revit imperial default template, with view templates, no custom plan types,
Succeeds,

Test 3
Two files, both created from Revit imperial default template, no view templates, no custom plan types, Rooms are in linked model, link is “origin to origin”, nodes for TotalTransform are not used
Fails, blue dots are in the right places, and I can select the tags by element ID, but I can’t see them

So, it seems to be a function of the rooms being in a linked model.
To be honest, this surprised me. I thought I was going to find that the custom view types were the issue, simply because they are less common, and therefore less likely to have been considered when the nodes were built. (also, they are something I inherited when I started here, and I think they are more trouble than they are worth, this would have helped my argument to get rid of them)

There is also a numbers issue. The new model I am using has 2 levels, and there are 4 rooms on the first, 3 on the second for a total of 7. There is a floor plan and ceiling plan for each floor, so there should be 14 total tags, but I am getting 28. I think that’s from the way I got the lists to be the same length.

Test 4
Re-run test 1, and double check, there are too many tags, again.
I deleted the ones I could see, then selected all the invisible ones (I selected one by element ID, and then selected all instances in the entire model), and cut, then paste aligned to current view. I happened to be on the level with three rooms when I did that, and I it pasted 3 tags, right where it should have. When I went to a view of the other level (with 4 rooms) and did a paste aligned to current view, I also got 3 (not 4) tags.

so, my conclusion is that its not the view templates, or the fact that it’s a linked model. The script is going to each view and tagging the rooms in just that view. it’s tagging all the rooms, somewhere, but not necessarily in any of the views I have. I still don’t know where, however.

@Tiago_Marafigo; @Eddie_Smith;

I noticed that you were struggling with a really similar issue in April - did you ever resolve it?

Hi,

I came across this thread and it seemed that this graph does what you need…

RoomTagDropped-plans.dyn (21.1 KB)

Hope that helps,

Mark

1 Like