Does anyone have experience in pyRevit?
I need to create the button and need to add in the shortcut keys.
then button is to hide and unhide the Linked point cloud from the current view.
Any help appreciated.
Does anyone have experience in pyRevit?
I need to create the button and need to add in the shortcut keys.
then button is to hide and unhide the Linked point cloud from the current view.
Any help appreciated.
from pyrevit import script
#Import pyRevit form library
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB import Category
from Autodesk.Revit.UI import *
app = __revit__.Application
uidoc = __revit__.ActiveUIDocument
doc = uidoc.Document
logger = script.get_logger()
logger.set_quiet_mode()
collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_PointClouds).ToElements()
cat = None
for i in collector:
cat = i.Category
if cat is not None:
t = Transaction(doc,'hide cloud')
t.Start()
doc.ActiveView.HideCategoryTemporary(cat.Id)
t.Commit()
Update
import clr
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System
from System.Collections.Generic import List
# Current doc/app/ui
doc = DocumentManager.Instance.CurrentDBDocument
pc = Autodesk.Revit.DB.PointClouds.IPointCloudAccess.GetName
pc1 =Autodesk.Revit.DB.PointCloudInstance.Name
OUT = pc1
You are question with pyrevit ?
yes
I need to add a new button then I can assign a shout cut key.
Thank you…