blimey Posted June 19, 2009 Share Posted June 19, 2009 Hi all, I've set new user's origins in many files and from my inquiries, that was a VERY BAD idea, since it seem that this tool mess up everything (see my post here : http://techboard.vectorworks.net/ubbthreads/ubbthreads.php?ubb=showflat&Number=125372#Post125372) .... Yet it ALAS has been done (one would'nt expect things to mess up like that)... now i'm wondering if there's a way to fix it up with a script that could "clean all the history of the origin reset" and put the file back to it's pristine state regarding origin (I would then move the whole drawing so to have the origin at the right place instead of using the "set origin" tool... Since I'm not a scripter at all, I'm posting this here, in case anyone did have the same problem and does have a ready made script I could try to adapt to my problem? Many thanks. Quote Link to comment
JBenghiat Posted June 19, 2009 Share Posted June 19, 2009 No script necessary -- choose Tools>Set Origin or double click the Set Origin tool at the top-left between the rulers. Select the Set Origin to Drawing Center option. Here are a couple of tips for shifting the whole drawing to the default origin: - Save the current view. Next make all layers and classes visible by option/alt-clicking in the "visible" column. Make layer and class options show-snap-modify others. After moving the origin, return to the saved view. - Double-click the locus tool and place a locus at 0,0 before and after switching the origin. Select All and drag the old origin locus over the new one. -Josh Quote Link to comment
_c_ Posted June 23, 2009 Share Posted June 23, 2009 You cannot reset origin by script anyway, but if you run the script by * applescript * "Run Vectorscript" command * script as resource in the Resource Browser Otherwise the origin shift won't apply after script execution, no matter what you do with it. NOTE: Check for rotate plan (GetPrefReal(93) <> 0) before any shift by script, no matter how you run your script. If plan is rotated the origin is always shifted, is normal. DON'T shift origin while plan is rotated, DON'T. orso Quote Link to comment
Yotarou Posted June 26, 2009 Share Posted June 26, 2009 The origin can be reset by the script. procedure ResetVWOrigin; var x, y :real; begin GetOrigin(x, y); SetOrigin(-x, -y); end; Run(ResetVWOrigin); Quote Link to comment
blimey Posted June 28, 2009 Author Share Posted June 28, 2009 Hi Yotarou I'm not sure how to use the script : when I'm running it nothing happens? (I've put it into >tools>script>vectorScript plugin Editor and then added it as a new tool) It doesn't make any error, but nothing happens? Quote Link to comment
blimey Posted June 28, 2009 Author Share Posted June 28, 2009 oh ok. I've put it in a txt files and then used "run vectorscript" and it worked. thanks a lot Quote Link to comment
MullinRJ Posted June 28, 2009 Share Posted June 28, 2009 This problem is one that has been bug-listed and wish-listed. SetOrigin() and SetOriginAbsolute() work in both Palette Scripts and Menu Commands (Plug-ins) while the script is running, BUT, when Menu Commands quit, VW resets the user origin back to where it thinks it was so your changes are not permanent. VW gets it wrong when the Plan is rotated from a script and the User Origin gets reset to a different place (also bug-listed). Bottom line, run scripts that are intended to move the User Origin from a Script Palette, or from the "Run VectorScript" menu (as you've already figured out) and it will work as you desire. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.