Revit links graphic overrides

Revit links graphic overrides

Anonymous
Not applicable
6,086 Views
24 Replies
Message 1 of 25

Revit links graphic overrides

Anonymous
Not applicable

Hello,

 

Is there a way to access the "Revit links graphic overrides" (cf : picture) from the API. I can't find any properties/methods to manipulate them, and if I use the builtin parameter associated to it (BuiltInParameter.VIS_GRAPHICS_RVT_LINKS) it always returns null. Any idea?

Revit_2017-12-07_13-12-44.png

0 Likes
6,087 Views
24 Replies
Replies (24)
Message 21 of 25

Luffy11
Participant
Participant

@naveen.kumar.t ,
Yeah I followed that sample, but it always returns None and I don't know why.

0 Likes
Message 22 of 25

Luffy11
Participant
Participant

Hi @naveen.kumar.t , 
When I try to provide a RevitLinkType, it works. Thanks for your suggestion. Then I still need to set the Halftone and Underlay, but they're not available for now, is that right?

0 Likes
Message 23 of 25

steven.williams.as
Advocate
Advocate

I think you need to use RevitLinkType, not RevitLinkInstance. Also don't pass in a view filter, because types do not have a host view. You can filter that out later if you need. 2025 introduces support for more options. RevitLinkGraphicsSettings Class 

 

link_types = FilteredElementCollector(doc).OfClass(RevitLinkType)
# note that you need to be in a view that supports overrides
# (not a schedule, title sheet, etc.)
for link_type in link_types:
	if uidoc.ActiveView.ViewTemplateId == ElementId.InvalidElementId:
		target_view = uidoc.ActiveView
	else: # view has template, so use the template overrides
		target_view = doc.GetElement(uidoc.ActiveView.ViewTemplateId)
	overrides = target_view.GetLinkOverrides(link_type.Id)
	print('{}: {}'.format(link_type.Name, overrides.LinkVisibilityType))
# prints something like
# File 1 Base.rvt: Custom
# File 2.rvt: Custom

 

 

Message 24 of 25

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @Luffy11 ,

As far as I searched, The Halftone and Underlay API for Visibility/Graphics settings overrides does not appear to be exposed.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 25 of 25

Luffy11
Participant
Participant

I got it, thanks a lot for your help @naveen.kumar.t  @steven.williams.as 

0 Likes