How to get views, schedules and sheets associated with an assembly

How to get views, schedules and sheets associated with an assembly

mateus.komarchesqui
Enthusiast Enthusiast
830 Views
1 Reply
Message 1 of 2

How to get views, schedules and sheets associated with an assembly

mateus.komarchesqui
Enthusiast
Enthusiast

I want to get the views and schedules associated with a particular assembly in order to place some of them inside the sheet associated with this same assembly.

 

The items are the following, associated with AS03 assembly:

mateuskomarchesqui_0-1652354570116.png

 

I couldn't figure out a way to fetch only these views, schedules and sheet.

 

I already tried using FilteredElementCollector in the document and then separate these specific items comparing the AssociatedAssemblyInstanceId parameter (tried only for the views so far) with the AS03 Id.

 

Turns out this query returns the same list fetched by FilteredElementCollector, beeing every view from the document.

 

Is there any way to separate only the items from the picture?

0 Likes
Accepted solutions (1)
831 Views
1 Reply
Reply (1)
Message 2 of 2

Simon.Pusateri
Contributor
Contributor
Accepted solution

Hi Mateus,

 

I would perhaps try this the AssemblyInstanceId parameter instead

SimonPusateri_0-1652370876648.png

 

From the descriptions, it seems that AssociatedAssemblyInstanceId is specific to assembly views, whereas AssemblyInstanceId would tag any view that belongs to that assembly.

Best of luck,

 

Simon

0 Likes