Does anyone have a script to save a V5 file alongside V6 automatically,I can set it up on an alias This is for compatibility with other users in our office.
I don’t really have time to look into coding this myself ,So it would be super handy if someone has a script prepped,Possibly Pascal?
Hi Jason - see if this works:
import rhinoscriptsyntax as rs
def SaveMultiFormat():
new = False
name = rs.DocumentName()
if name is None:
rs.Command("Save")
if rs.LastCommandResult() != 0: retrurn
name = rs.DocumentName()
new = true
if name is None: return
if not new: rs.Command('_Save')
path = rs.DocumentPath()
fullPath = path + name.strip('.3dm') + 'V5' + '.3dm'
rs.Command('_-Save Version=5 ' + chr(34) + fullPath + chr(34) + ' Enter')
if __name__ == '__main__':SaveMultiFormat()
SaveMultiFormat.py (549 Bytes)
To use the Python script use RunPythonScript
, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
-Pascal
That’s great Pascal,Thanks.
I was almost there myself but i am not very familiar with Python,I shall tweak to my exact needs.
Brilliant,Thanks
You’re welcome. Also, spell ‘retrurn’ right…
-Pascal