Run a Command, a .scr or a .lisp from dynamo

I am working on a dynamo routine to convert a survey drawing to our standards. I got the layer translation all set but i still need to do more cleanup like make all the objects to be by layer and set all the text to be an specific style. Is there a way to run a command within dynamo, a script (.scr) or a lisp?


You can use Python to open a file. I am not at work at the moment, but if you can’t find anything (tomorrow)i could write you something.

Thank you Daan i appreciate it. I just don’t see were to start because i am not familiar at all with python.

This is an example you can use to set all the Text and MText to the same style

SetAllObjectsColorByLayerAndSetAllTextsStyle.dyn (6.0 KB)


import sys
path = r’C:\Program Files (x86)\IronPython 2.7\Lib’

import os

def playSomething(path):
from os import startfile

OUT = playSomething(IN[0])

I hope you can use this script, this will be able to run almost anything.

1 Like

Thank you Paolo, the script works very well.

Thank you Dann, i will give it a shot.

Dann, i tried to run a simple .scr file using the python script but i get errors "runScript.dyn (4.8 KB) "image002

he csanchez use a “StringfromObject” between the “FileFromPath” and the Python Script

Hi Dann, thanks for the reply. I added the “StringfromObject” between the FileFromPath and i still getting the same error. I am attaching the files. (FYI the .scr file is share as .txt becaouse the forum upload won’t let me attached as with the script extension)

runScript.dyn (6.0 KB) Uppercase-all.txt (22 Bytes)

Okay i also see that i get that problem, try using this setup, this works for me :slight_smile:
New Setup for csanchez 2019-12-13.dyn (3.4 KB)