Jump to content
Developer Wiki and Function Reference Links ×

reset origin cleaner...

Recommended Posts

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.

Link to comment

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.


Link to comment

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.


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.


Link to comment

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.


Link to comment

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...