Determine if a view is duplicated or not


i’ve been thinking if there is a way to determine if a view is duplicated from another one. Is it possible?

Thank you!

Possibly. If your view is a dependent view, yes. If not, you can’t directly trace it back to the view from which it was duplicated.

You can use the GetPrimaryViewId method to get the original view (as noted by the documentation, an invalid ElementId will be returned if the view is not dependent).

1 Like

Unfortunately my view is not duplicated as dependent.

But thanks for the help!

Yeah i dont think it is possible to see with dynamo if a view has been duplicated from another one, but you can check with dynamo if you have duplicate views in your project. Don´t know if you are looking for that?

I haven’t tried it, but duplicated might be doable, or at least narrow the list to check. That is to say get the views which share a common view range, plane, crop region, and view type. If they have been modified a lot than things may be so different it doesn’t work anymore, but if they are still the same it might be crazy enough to work. :slight_smile:

  1. Get the view family type (ie structural floor plan, furniture plan, etc) and pull the name.
  2. Get the view plane and pull the associated coordinate system, and convert to a string.
  3. Get their view range parameter values for depth and convert to a string.
  4. Get their crop boundaries, and convert the resulting objects to a string and concatenate them into a single string per element by joining them with a semi colon or other common field you’ll be able to read.
  5. join the strings for view type name, the string for the coordinate system, view range, and crop boundaries into a single concatenated string.
  6. group the views using this as a key. Items with a common group are likely duplicates.
1 Like

Thanks for the help Jacob, but unfortunately, it won’t work.

The duplicated views on the projects are modifed quite a lot… up till a point that none of those steps you described are common to both the duplicated and the “original” view.


If they are this different, why do you care?

I have a program that needs to diferentiate these views somehow.
Since there is no method for doing so i decided to change the process involved.
But thanks for the assistance!

1 Like