Revit Subcategory management in a Component Family Workflow

Hi all

I am working with the basic concept outlined here under Rhino objects as Loadable Families (Rhino.Inside®.Revit), especially in the video.

It works well, and is the basis of a workflow where the Rhino layers are essentially translated into Revit subcategories, allowing for visibility and graphics control similar to a standard layer-based graphics control in Rhino or CAD.

However, my system breaks down in the following two instances:

  1. A Rhino layer is deleted. Now the subcategory created from that Rhino layer is obsolete
  2. A Rhino layername is changed. Now the subcategory created from that Rhino layer has the wrong name, and loses its association with the Rhino layer.

We are considering building a subcategory manager which tracks these relationships by setting up a dictionary associating the Rhino layers and the Revit subcategories by their respective ID#s instead of their names, which would allow changes to be tracked and resolved.

Is no one else having this issue? Am I missing something? This caused our whole workflow to breakdown.

Thanks!

Brian

Creating a SubCategory and then changing its name is working here in a simple example. It sounds like your situation is more complex, especially if you are updating Family to Project subcategories.

Added

Changed Name

@Japhy Thank you for testing: You are correct. I am getting the same behavior with your simplified setup. I will have to figure out why my more complex setup is breaking that relationship. This solves the more important half of my problem.

Regarding “A Rhino layer is deleted. Now the subcategory created from that Rhino layer is obsolete”:
Actually, I updated my Rhino.Inside and Add Subcategory seems to track subcategories including deleting subcategories when the input item is deleted from the list. This is great news, and means that my entire question was the result of using an old build. Sorry about that!

A related problem: Would it be possible to set the default visibility of a new subcategory to Off in the Visibility/Graphics Overrides of all views, and all view templates? Currently, every time I add a new subcategory I have to chase it down everywhere and turn it off where it should not be visible, whereas in some cases it would be better to be able to go to views where it should be visible and turn it on.

Anyone have thoughts?

I am having a related issue.

I fed in an updated list to the Add Subcategory component. It did update the subcategories. However, I have evidence that the tracking is not working correctly, which is visible in the VG overrides for a view. Before the update I set the projection line override to pink for the five subcategories in question. After the update, this override was applied randomly to five different subcategories (five of the newly added ones). See the photos below.

Before the update

After the update

Thanks, I’ll try and replicate.

1 Like

I just did some testing and found that if I delete my Add Subcategory component, accept the warning that elements are no longer tracked, and then replace the Add Subcategory component with a new one, this solves the problem. It’s because my script was made while I was running an old version R.i.R., which had an old version of the Add Subcategory component. I updated my Rhino Inside but the Add Subcategory component didn’t seem to update within the script? Do the Rhino.Inside components need to be manually replaced? Why is it not auto-replacing these components with updated ones?

PS the same is true for the Component Family Form component. It is throwing this error: 1. Data conversion failed from Revit Category to Integer

But when I replace it with a new one, I see the inputs are renamed, and reordered, and the error was the result of the subcategory input going into the input which on the old one was the subcategory input but on the new one is the visibility input.

The old one is the red one with the error:

This is so strange that the old component was not auto-updated, but that it was behaving as if it expected the subcategory in the input below where it is labeled in that component. So it sort of half-updated?

What is the correct method for managing updates to R.I.R. components between R.I.R. versions?

Also, is there somewhere with more detailed documentation of a specific component? The guides contain this:

But when I right click on the component I see many options that I would like to better understand.

When a component gets auto-updated it will have the Orange Group around it. I’ll add a bug report to start an investigation what you are seeing in the SubCategory components.

image

The defaults should suffice but for more control you can right click and change the Element Tracking and Error handling. I haven’t come across a condition where changing the error handling is needed.

https://www.rhino3d.com/inside/revit/1.0/guides/rir-grasshopper#element-tracking

1 Like

Great, thank you. I have read the Element Tracking guide, but I do have a question:

If I use a single script (see below) multiple times, each time sending through a different set of geometry with different subcategories into different families, do the components (Add Subcategory for example), actually track each of these transactions even after the script has been used for a different set of geometry/subcategories? Or is it more that the Add Subcategory component, for example, forgets what it just did, looks at the names in its Names input and compares them with existing subcategories, and just makes the ones that don’t exist yet?

I am getting this behavior:
There are 5 DOOR subcats already in the model:

I send the DOOR layers through, and the subcategories are created from these layers

Then I send the TMBR layers through, and the newly added door subcats disappear:

This suggests that I cannot reuse an Add Subcategories component for different sets of inputs, as the tracking is limited to a single stream (unless I send a single stream with grafted branches of inputs, in one transaction). A sequential use of the component is not supported. Is this correct?

So I think the correct solution is for the Add Subcategories function of my script to be separate from the New Component Family pipeline. I should process all Rhino layers, sort them according to my tags, graft these into branches, and create/delete/rename all subcats through a single Add Subcat component. Then in the Family pipeline, I should reference the needed subcats from Revit, using a list of relevant rhino layers, and not add or modify any subcats in that workflow.

One remaining question is whether sequential use of New Component Family and Add Component (Location) is supported? In other words, can I send one set of inputs into those components, then send another, and it will not delete or corrupt the first transaction?

I am curious to hear what others are doing

Incidentally, I think it would be very useful for the Add Subcategory component to give a report of what it did: added these subcats, renamed these, deleted these. I am setting up views and color coding subcats to get visual confirmation of what is happening–very clumsy

Correct, if i understand correctly you would be better off not using the tracking in this case. By not tracking you ensure the sub-categories are added on previous ones are not removed. The same with the New Family Component and placement. If you are tracking its going to try to rectify this with the previous transaction, which you are looking to keep.

Yes but if I give up tracking it will not delete subcats corresponding to deleted items in input list. It also will not track renaming. Those are essential features of the updated Add Subcat component which I was relieved to find when I updated R.i.R.

Therefore, I have to have multiple Add Subcat components, one for each set of layers/subcats, graft everything into a single transaction, or manage all subcats in a single flow separately and simply reference them rather than modify them in the family workflow (which I think is a better practice anyway).