Hi all,
I want to check whether the interference check dialog box is closed or not and I want the script to be executed after or once the interference check report is generated.
Below is the snip that explains the requirement
Below is the code that I am working on:
import clr
import sys
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
import System
from System.Collections.Generic import *
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
import time
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
RunIt = IN[0]
if RunIt == True:
CmndID = RevitCommandId.LookupCommandId('ID_INTERFERENCE_CHECK')
CmId = CmndID.Id
uiapp.PostCommand(CmndID)
errorReport = True
#time.sleep(delaysec)
else:
errorReport = False
#Assign your output to the OUT variable
OUT = errorReport