Skip to content

Commit

Permalink
Merge pull request #1694 from jmcouffin/feature/override_vg_dash
Browse files Browse the repository at this point in the history
Enhancement OverrideVG options with Dash
  • Loading branch information
jmcouffin authored Jan 4, 2023
2 parents 73ee4fa + 660f04b commit 4564bdc
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ def solid_line():
revit.doc.ActiveView.SetElementOverrides(el.Id, ogs)


def dashed_line():
with revit.Transaction("Set Element to Dashed Projection Line Pattern"):
for el in selection:
if el.ViewSpecific:
ogs = DB.OverrideGraphicSettings()
ogs.SetProjectionLinePatternId(
DB.LinePatternElement.GetLinePatternElementByName(revit.doc, 'Dash').Id
)
revit.doc.ActiveView.SetElementOverrides(el.Id, ogs)


def whiteout():
# 0xffffff
colorvg(0xff, 0xff, 0xff,
Expand Down Expand Up @@ -141,7 +152,8 @@ def mark_blue():
('Solid-Red Selected', mark_red),
('Solid-Green Selected', mark_green),
('Solid-Orange Selected', mark_orange),
('Solid-Blue Selected', mark_blue)])
('Solid-Blue Selected', mark_blue),
('Dashed-Line Selected', dashed_line)])


selected_switch = \
Expand All @@ -151,7 +163,8 @@ def mark_blue():
'Solid-Red Selected': {'background': '0xff5714'},
'Solid-Green Selected': {'background': '0x6eeb83'},
'Solid-Orange Selected': {'background': '0xffb800'},
'Solid-Blue Selected': {'background': '0x1be7ff'}},
'Solid-Blue Selected': {'background': '0x1be7ff'},
'Dashed-Line Selected': {'background': '0xaaaaaa'}},
message='Pick Visibility/Graphics override option:'
)

Expand Down

0 comments on commit 4564bdc

Please sign in to comment.