One-liners
-
No offence was taken! The japanese just says I'm a carpenter too and lived (a short period of time) in Osaka a few years back. I was also not left unmoved by Japanese craftmanship when it comes to woodworking. We even ended up selling one of their products a few years back, here in Europe. http://mitaka.eu/
It's still the traditional side that gets to the heart -
Why no semi-colons? Seems that we're doing one-statements instead of one-liners then.
-
@thomthom said:
Why no semi-colons?
meh..
view = Sketchup.active_model.active_view ; view = view.zoom 1.052
parallel projection -> zoom extents -> use the code for true zoom extentsβ¦
i use it sometimes for printing.
(also part of an applescript i use for easy printing to scale from sketchup) -
Why not...
Sketchup.active_model.active_view.zoom(1.052)
Or to include the zoom extents...
Sketchup.active_model.active_view.zoom_extents.zoom(1.052)
Don't know how to activate the parallel projection though. Anyone?
-
Activate Parallel Projection for the current View's Camera:
@noelwarr said:
Don't know how to activate the parallel projection though. Anyone?
Sketchup.active_model.active_view.camera.perspective = false
-
-
@thomthom said:
@unknownuser said:
view.zoom 1.052
Where does this magic number come from?
.. and it seems to work in Parallel Projection mode, but not in Perspective mode.
-
@noelwarr said:
Why not...
Sketchup.active_model.active_view.zoom(1.052)
Because I don't know ruby
I just found something that worked for what I needed.
but your version doesn't use a semicolon so I'll make that my thread entry -
@thomthom said:
@unknownuser said:
view.zoom 1.052
Where does this magic number come from?
by trying .05... then .06... then .055.. then .054.. etc
[edit-- hmm.. just checked my AppleScript and I'm actually using .053 in it.. that's the one I tested with actual paper/printer]
-
I've actually gone and changed my first post so that semi colons are allowed, and have modified your magic formula so the 3 steps are all in one line. I wanted no semicolons to avoid people going crazy with them (you could essentially write a whole program with them in one line of text). How about 3 semi colons maximum?
Advertisement