Hello,
I'm working on a script which changes the units off all VWX files in a folder.
The Problem is that the file opens to late when the script is already finished. I also tried it with the sleep () command.
Is there a way to open a file and make it active within a function?
def main ():
# Get File
succes, path = vs.GetFileN('', None, None)
# Open File
if get_OS_Code() == OS_WIN:
# Windows command
os.system('start' + path )
else:
# Mac command
os.system('open ' + path )
# Set Units
Millimeters = 7
Centimeters = 8
Meters = 9
Kilometers = 10
vs.Units (Centimeters)
# Save the File
vs.DoMenuTextByName("Save", 0)
# Close the File
vs.DoMenuTextByName("Close", 0)