Posts: 1,873
Threads: 84
Joined: Jul 2011
Re: How do I use LDView form the command line in OSX?
2011-12-01, 8:13
Assuming it's installed in /Applications, the following will save a snapshot (if you run it from the models directory of your LDraw directory):
/Applications/LDView.app/Contents/MacOS/LDView CAR.DAT -SaveSnapshot=CAR.png
Please refer to the help file for the full list of command line options, but probably some of the most useful ones for snapshots are -SaveWidth=x -SaveHeight=y -SaveZoomToFit=1 -AutoCrop=1 -SaveAlpha=1 -PreferenceSet=whatever. (Note that -SaveAlpha=1 only works with PNG images.) Use the last one (-PreferenceSet=whatever) to configure all the options the way you want them in a Preference Set using the LDView UI, then specify the preference set name on the command line. That way you don't have to specify all the options on the command line. Note though that only options with a NO in the Global? column in LDView's options list in the help are preference set-specific.