How to get links display settings

How to get links display settings

ecshinPBNNW
Explorer Explorer
445 Views
1 Reply
Message 1 of 2

How to get links display settings

ecshinPBNNW
Explorer
Explorer

ecshinPBNNW_0-1637718413835.png

I want to get Display Settings from the linked file grid settings visibility

as order from the 1st to 5th. 

 

Kindly give us instruction.

 

0 Likes
446 Views
1 Reply
Reply (1)
Message 2 of 2

BardiaJahan
Advocate
Advocate

This is how I would get visibility of the category Grids in the only linked model in the active view:

 

UIDocument uidoc = commandData.Application.ActiveUIDocument;
Document document = uidoc.Document;

FilteredElementCollector links = new FilteredElementCollector(document, document.ActiveView.Id).OfClass(typeof(RevitLinkInstance));
Document linkedDoc = links.Cast<RevitLinkInstance>().FirstOrDefault().GetLinkDocument();

Categories categories = linkedDoc.Settings.Categories;
Category grids = categories.get_Item(BuiltInCategory.OST_Grids);
bool visible - grids.get_Visible(document.ActiveView);

 

Is this what you want to do?

0 Likes