pyXam
November 22, 2023, 1:46am
1
Hi Team,
Does anyone know if it is possible to somehow retrieve results of a postable comand used in dynamo?
Exaple usage is a have a script that uses the command for spellcheck but i want to k ow if it is possible to retrieve the results ie;
-text checked
-errors found
-ignored
-changed
Etc etc…
Any ideas?
1 Like
Hello,
try this like a dictionary
KR
Andreas
pyXam
November 22, 2023, 9:27am
3
The output after the python doesnt have any items, im assuming its something i missed in the code but i can post the code tomorrow (nz time) for others to review.
1 Like
pyXam
April 2, 2024, 11:13pm
4
Was a long time coming…
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIDocument
app = DocumentManager.Instance.CurrentUIApplication.Application
uiapp = DocumentManager.Instance.CurrentUIApplication
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
output = []
pCmd = RevitCommandId.LookupPostableCommandId(PostableCommand.CheckSpelling)
if IN[0] == True:
uiapp.PostCommand(pCmd)
output = True
else :
output = 'set runit to true'
OUT = output