Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement OverrideVG options with Dash #1694

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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