Duplicate View with Detailing - category question

Duplicate View with Detailing - category question

cig_ad
Enthusiast Enthusiast
617 Views
2 Replies
Message 1 of 3

Duplicate View with Detailing - category question

cig_ad
Enthusiast
Enthusiast

Hi everyone,

 

I'd like to get a list of all categories of elements that are copied into a new view when duplicating using ViewDuplicateOption.WithDetailing. I thought I could filter the category's CategoryType property for Annotation - but that doesn't seem to correspond to the copied elements. For instance, the 'Detail Items' category (e.g. filled regions) are CategoryType.Model). Any thoughts?

 

Thanks, Peter

 

0 Likes
618 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

I can only address the first part of the question, because I do not understand the rest:

 

I'd like to get a list of all categories of elements that are copied into a new view when duplicating...

 

How about simply creating a filtered element collector with the new copied view Id, iterating over all the elements returned and creating a set of all their categories?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

cig_ad
Enthusiast
Enthusiast

Hi Jeremy,

 

thanks for answering. I need the list of categories before the views are duplicated in order to give the user a choice of which view specific (annotative) elements are copied.

 

I would have thought that the Category property 'CategoryType' value 'Annotation' corresponds to those of the non-model elements that are copied into a new view when duplicating with detailing, but that is not the case.

 

regards, Peter

0 Likes