weberj Posted August 11, 2005 Share Posted August 11, 2005 Where can i find an "idiot's guide to Vectorscripts"? For example: I am in the habit of using construction lines a great deal when drawing. I understand that i can create construction lines by going to "edit", "make guide", but that is cumbersome. I have tried writing scripts for tools called v-line and h-line, but some aspect of the process eludes me. The goal is to click on the script, then on a point in the drawing. The script would then make a vertical (v-line) or horizontal (h-line) line, extending from that point to to the limits of the screen in both directions, and convert the line to a guide. This is my first attempt at script writing. I picked something i thought would be pretty easy, but i must be missing something. Can somebody help me out? Quote Link to comment
Steve Cox Posted September 29, 2005 Share Posted September 29, 2005 Is this the sort of thing you're looking for? You might want to change the units to matcth yiour drawings. This gives vertical and horizontal guidelines, but the lock command doesn't lock the PIO in place. I don't know why. Steve BEGIN DSelectAll; move(-5000mm,0); LINE(10000mm,0mm); DoMenuTextbyName('Guides',1); Move(-5000mm,-5000mm); LINE(0,10000mm); move(0,-5000mm); DoMenuTextbyName('Guides',1); SelectAll; DoMenuTextbyName('Lock',1); END; Quote Link to comment
jan15 Posted September 29, 2005 Share Posted September 29, 2005 But if you just want to avoid cumber, you can use the workspace editor (File > Workspaces > Workspace Editor) to assign a single keystroke to the Make Guide command. Just type the keystroke you want to assign to it, to the right of the command as it appears in your workspace (that's the window on the right side of the editor). Quote Link to comment
weberj Posted September 30, 2005 Author Share Posted September 30, 2005 Steve, this is helpful. I compiled this script on my machine, and when i ran it , it gave me an error message about the menu cmmand, but went ahead and drew a vertical and horizontal guide intersecting at the origin. (and locked them). I will try to modify your script into two versions, one of which will give me a horizontal guide of a given length with its center point at the next click, and a similar vertical guide. Thanks for taking the time Quote Link to comment
weberj Posted September 30, 2005 Author Share Posted September 30, 2005 Jan, Your idea will simplify the process of turning a given line into a guide, which is good, but i want to be able to click on a point and get a vertical or horizontal guide without drawing the line first. Thanks for your suggestion. I think i will use it until i get the other script working the way i want. jw Quote Link to comment
jan15 Posted September 30, 2005 Share Posted September 30, 2005 If you turn on "Snap to Loci" in VW Preferences, then placing a locus automatically displays infinite length horizontal and vertical lines through it. They don't evoke screen hints, but things do seem to snap to them in some ways. But if you use loci for other purposes this probably won't work for you, because all those loci will have the same long hairy lines, cluttering up the drawing unbearably. Quote Link to comment
weberj Posted September 30, 2005 Author Share Posted September 30, 2005 Jan, Thanks. That is even better for me. JW Quote Link to comment
weberj Posted September 30, 2005 Author Share Posted September 30, 2005 Actually, if i hit make guide after sutting the locus, i get the guides i"m looking for. So i combined it with your previous suggestion and now i can st the guides pretty quickly, thanks. Quote Link to comment
islandmon Posted October 1, 2005 Share Posted October 1, 2005 Lets not forget the Preferences>Display>Full Screen Cursor 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.