Python micro framework to process actions on revit models from cli/command line
process_model.py
will spin off a subprocess to write a journal file and add-in according to your specified task and project.pip install --user beautifulsoup4 bokeh colorama colorful docopt numpy pandas psutil olefile slackclient rvt_detector rjm
When the above mentioned requirements are met and this repo is cloned to your preferred path, let's get started with a common task (read qc stats (qc meaning "quality check" in this context)) in a few steps:
step 1: Run a qc read out from cli
Run process_model.py
from command line:
Now we can run the qc_model without even touching Revit and get interactive html graphs produced.
Compose a command line instruction consisting of the following:
your CPython interpreter
your path to process_model.py
command name
project name
full path to the project Revit model
a timeout for the process (optional - default is 60 seconds)
So it could look like this:
"C:\Program Files\Python37\python.exe"
D:/testrun/934_rvt_model_services/process_model.py
qc
123_N
D:/testmodel/123_N.rvt
--timeout 600
Just concatenate it (put it into one line with spaces separated):
"C:\Program Files\Python37\python.exe" D:/testrun/934_rvt_model_services/process_model.py qc 123_N D:/testmodel/123_N.rvt --timeout 600
Open a command line ("Win > type 'cmd'") paste it in("right-click > paste") and run it.
If you want to write the html to another directory you can use the optional switch "--html_path" followed by a path.
Here is how this looks on my screen:
step 2: Let task scheduler repeat your task
For recurring tasks hook it up to Windows® task scheduler:
Open Task scheduler and create a new basic task
"C:\Program Files\Python37\python.exe"
D:/testrun/934_rvt_model_services/process_model.py qc 123_N D:/testmodel/123_N.rvt --timeout 600
If you are too lazy to type the path for different projects all the time (like me) you can set them up in a config.ini like this:
[123_N]
path = D:/testmodel/123_N.rvt
With this setup you can substitute the actual full_model_path in your command with just: cfg
If you want to get notified on model corruption or circular links just add the flag --notify
to setup notifications (currently email or slack) refer to the README.md of the notify module.
qc:
rvt model qc statistics on workshared models
qc_no_ws:
Same as the above command without opening model worksets
dwf:
DWF sheet exports of sheet set "Auto_PDF_DWF" on workshared models
dwg:
DWG sheet exports of sheet set "Auto_PDF_DWG" on workshared models
warnings:
Model warnings export on workshared models, pre-rvt2018
pulse:
Bokeh graph showing the job log graphically(which project was process in what time, did it timeout -> red bar).
run separately from process_model with: "python bokeh_pulse.py" from commands/pulse/ directory.
audit:
Bokeh graph showing the rusult of models being opened with "audit".
if configured an email will be sent if the model is corrupt. see readme for email config guide in notify/email/
success: green, unclassified error:orange, corrupt model: red.
run separately from process_model with: "python bokeh_pulse.py" from commands/pulse/ directory.
audit_no_ws:
Same as the above command without opening model worksets
relink: Re-links rvt and cad links of models in transmitted model state
upgrade: Upgrades rvt models
move: Moves rvt models to target directories
--nofilecheck
optionnote: If you are not on this list, but believe you should be, please contact me!