Tags using AddComponent (Location)

Hi,

I’m trying to place tags within Rhino Inside using AddComponent and it semms ok but the tag isn’t reading the Mark of my object.
When I place the tag manually it works fine. Do you have any idea of what is happening?

Thank you

In this image the left tag has been placed using the script and the other by me manually.

image

A tag is going to be particular to a view and the category of element being tagged. Here is a python example Ehsan did that tags a wall.


RE_AutoWallTag.gh (16.7 KB)

Here i created a new furniture tag, queried all the furniture in the view and used their locations to place new tags.

Hi,
I would like to assign room tags to Revit rooms using your Python script which worked perfectly for wall, window tags. But for rooms I need to put the tags in the centre of the rooms like Revit do this. Please look at the printscreen.
Room tags

I’ve also tried to use Add Component (Location) but all parameters define in tags are missed.

Any suggestion how to developed script also for centre location tags in rooms?

AnnaAN, Room Tags are a different bird.

See attached, one goes the adjustable room location, the other to the bounding box center.


PlaceRoomTag.gh (12.5 KB)

Thank you for your help and time. I’ve tested your solution but in my case the scripts didn’t work.

The first solution using Room Location gave me error: 1. ‘Room’ object has no attribute ‘Centroid’

The second solution based on Room Center have placed tags not at the center of the rooms. I have also noticed that working Room Center Python script depends on the file units (please see below printscreen_first in meters, second in centimeters, in millimeters tags are far away from main model).


By the way, I have one suggestion that possibility to choose tag by name could be very helpful.

My bad on the Centroid, must not have saved.

PlaceRoomTag.gh (12.3 KB)

I’ll have to get back to you on the unit conversion aspect.

The Create.NewRoomTag doesn’t have a type overload, so referencing the tags after and changing the family type would be required.

Thank You very much for corrected file and explanation. Now Centroid version works.

Try this in your mm or meters file.

Re_PlaceRoomTag.gh (11.6 KB)

Perfect!It works.Thank YOU again.

Hi Japhy,
It will be very helpfuf if output of the new room tags will be available in the component.

Is it any chance to modify in easy way pythonscript to get output?
I will be very grateful

Non-element tracked elements output.

Re_Re_PlaceRoomTag.gh (13.6 KB)

Sorry for the late reply. Thank you. It works.

Is it any way to delete old tags (window, doors) when you change the type of the tag (not double it) when it is python-script?Something similiar to tracking in regular RiR components.

Hi AnnaAN, Is there any reason you wouldn’t query the same view and change they Type via Native components?

Thank You but I would like to remove only those elements that were created using the python script, not all contained in the drawing.Especially the problem is with Python Text Script.

AnnaAN, Scripted Tracking isn’t available yet, that will be a feature in Rhino.Inside.Revit 2.0 API

In your definition above you are collecting all Windows in the project but only applying the tag per View. Its creating tags for each window, where the the non-visible ones are out there somewhere.

See below for using just the view.

What is different about the ones created in the Python Script?

We can do pseudo tracking a few different ways, each has benefits and pitfalls.

Store a value as a parameter in Revit.
Store a value in the GH document (which looks like you started doing)
Hold a collection of IDs in the Python Script.

Hi @Japhy, thank you for sharing this information. By any chance have you worked on a similar code but for keynotes instead of tags? It would be very helpful.
Thank you,

Hi Fernando,

There isn’t a keynote component, these are slightly different than an independent tag, see this post for more details.

1 Like

Hi Japhy,

I have just tried to follow the above to tag structural columns in a number of sections and it doesnt seem to work. What do I need to alter to tag all the structural columns within multiple revit sections?