I am trying to figure out how tag rooms using Dynamo, but am running into some issues. I’m using the Lunchbox plugin on Dynamo 0.8. Here’s what I have so far -
The Create Tag node is returning nulls, and I can’t figure out why. I’ve looked at previous posts about similar subjects but can’t seem to get it to work. Would appreciate some feedback.
First of all, you need to post the image a little bigger so the community here can see what the problem is. Right now I have no clue how to help you, because I have no clue what your problem is.
Pelle,
This is good. Posting a file usually helps a lot as I can jump in and start testing it.
The problem is that you are using a Create Annotation Tag node (written by me actually), that doesn’t support Room Tag creation. You see, a Room Tag and an Annotation Tag are NOT the same thing in Revit. I know this sounds strange but according to Revit API there are two different methods to create each. A Room Tag uses doc.Create.NewRoomTag() and Annotation Tag uses doc.Create.NewTag(). Let’s just say that I missed that when I was working on the annotation tag node so here is me amending my mistake:
Again, this node works very similarly as the previous version of it, so the inputs are as follow:
TagLocations - points for where the tag will be located. With room tags its easiest to do what you were doing which is use the Location node and get a room location point.
TagType - use a FamilyTypes node to get a Room Tag Type
Elements - in case of rooms it will be room elements, but if you are tagging walls then these will be other element types.
Views - if all elements that you want to tag are in the same view this can just be a single view element, but if you want to tag all rooms on multiple floor plans then make sure that this is a list of one view per one element.
RuniT - its a boolean toggle. Set it to True to tag. I put that in so that you don’t accidently run this definition multiple times, effectively creating more than a single tag instance.
<span lang=“EN-US”>Thanks a lot for your feedback. It was a great help to solve the case. </span>
<span lang=“EN-US”>I have updated the script, room tag so that it convert the point from metric to imperial, because then it also works for the metric templates. Do you have a better way to convert the points then convert them into strings?</span>
Mhmmm, this is interesting. What you are telling me is that since your project is set up in Millimeters the node wasn’t working properly. I think I was able to fix that. It was a small mistake on my part. If you download the latest archi-lab package you should find an updated Create Annotation Tag node that will no longer discriminate between Imperial and Metric systems.
Good luck!
Also, when converting points you can use Point.X, Point.Y and Point.Z values then multiply them by whatever factor and then re-combine them into points. Much easier than doing strings.
Well, if its not the visibility settings then its simply that your tags are not aligning with your plan. That would mean they got created somewhere off in space and probably beyond crop region of the view. Why would that happen - you ask - if I clearly pulled a Location from each of the rooms?
Check if your linked model is linked in via Shared Coordinates. If yes, chances are that its origin point is different than what you have in your host model. Now, that is tricky yet simple to solve. Each link instance will have something called TotalTransform property and that’s basically the difference between host origin and linked file origin points wrapped into a Transform class that can be used to transform points - for example - from one coordinate system into another.
“Create Annotation Tag” node is returning nulls when I’m tagging ''Room Tag" with Dynamo 0.8.2 and with the latest archi-lab package.
But in your post “Create Annotation Tag” node is tagging “Room Tag” normally. “NewRoomTag” was not found but I confirmed Python script in “Create Annotation Tag”. I can’t figure out why.
If you don’t mind you could please share this graph. I tried to reproduce this but can’s seem to find 3 nodes. Document.Views, View.Type & Element.Location. Where can I find them. Are they a part of a package. This would really be a time saver.
Hi, I was wondering how we would control the ‘tag leader’ and the ‘leader shoulder’ points using the “Create Annotation Tag” node by @Konrad K Sobon.
In this context I am looking at Elements, not rooms, from current view lists to accelerate a tagging process with leaders and shoulders at right angles to one another.
Thank you. I was able to recreate your graph. It ran without errors too but the room tags are not showing in floor plan views. Did you figure out the TotalTransform property?
I’m stuck with quite a similar error, where it gives “Space is not iterable”. I guess it’s because I have several types of “TagType”, that are associated to each Space. Someone knows how to handle with this?
Hi Guys. I have a script that will add room tags to multiple views (by level). I’ll share this when I’m back at my computer in case it helps.
Konrad’s comment about shared coordinates is interesting. The only model I’ve tested this on so far is linked ‘origin to origin’, but we normally link by shared coordinates. I’m going to acquire shared coordinates then run it to see what happens! If it doesn’t work I’ll also be figuring out what the total transform property is…
I tested my graph on a model that was linked origin to origin with acquired shared coordinates. They still place correctly thankfully so this will work for me on most projects.
Anyway, here’s a WIP version of the graph I’m working on just in case it helps (I have only set up one level so far).