Skip to content

Instantly share code, notes, and snippets.

@Cyril-Pop
Created November 11, 2019 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cyril-Pop/61bf692106c5399069f878be1fb3c087 to your computer and use it in GitHub Desktop.
Save Cyril-Pop/61bf692106c5399069f878be1fb3c087 to your computer and use it in GitHub Desktop.
[Dynamo+=Python] SethiddenCad
def SethiddenCad(viewtoset, viewname, visible_lst, hidden_lst):
out = None
TransactionManager.Instance.ForceCloseTransaction()
TransactionManager.Instance.EnsureInTransaction(doc)
for _idV in visible_lst:
viewtoset.SetCategoryHidden(_idV, False)
for _idH in hidden_lst:
viewtoset.SetCategoryHidden(_idH, True)
out = "Etat des calques appliqué sur la vue {}".format(viewname)
TransactionManager.Instance.TransactionTaskDone()
return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment