TheSwamp

CAD Forums => CAD General => Topic started by: ELOQUINTET on February 02, 2004, 12:10:27 PM

Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 12:10:27 PM
i was trying to figure this one out on my own but can't seem to. i have offset buttons. i would like to set the  drawing units to fractional 1/32 precision before it starts. or maybe the better way to go would be a script of some sort that automatically sets my variables when i open any drawing. how would i go about this script?
Title: yet another button question
Post by: Keith™ on February 02, 2004, 12:15:00 PM
Write a script, using the system variables simply enter the one you want to change then the value, making sure to enter each sucessive variable on a different line.
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 12:21:55 PM
ummm never actually done one or seen one for that matter. could you just give me an example of the format please. and where would i put that to run everytime i open a drawing? thanks man
Title: yet another button question
Post by: daron on February 02, 2004, 12:29:58 PM
(setvar 'dimzin 1)

Is that what you're looking for?
Title: yet another button question
Post by: Keith™ on February 02, 2004, 12:38:02 PM
As Daron showed, simply place lines using this format in a file, add that file to the Startup Suite and you are off...

Incedently The lisp version will not work in LT
Title: yet another button question
Post by: daron on February 02, 2004, 12:41:27 PM
But you can do that in a toolbar, can't you? OR,
merely type,
dimzin;1;etc;etc;etc;
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 12:44:49 PM
well i tried putting it in the button daron but the dialog kept popping up and my precision keeps going back to 1/4. how do i suppress it and set all the values. i think i'll go the script route anyway but just curious how to suppress dialogs?
Title: yet another button question
Post by: daron on February 02, 2004, 12:52:56 PM
post what you put in your toolbar.
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 01:12:23 PM
^C^C-units;5;32;1;2;0.00;N;MOFF

it's working but i don't want the text window to appear at all.
Title: yet another button question
Post by: daron on February 02, 2004, 02:13:12 PM
^C^C-units;5;32;1;2;0.00;N;(textscr);moff

Will that work.
I know there are some dimvars to help you bypass using -units, but you'll have to dig them up. Look at express tools "system variable editor" and look at any variable starting with dim.
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 02:51:16 PM
daron here's what i get

Measure angles clockwise? [Yes/No] <N> N

Command: (textscr)
nil

Command: moff
Offset distance:

Requires numeric distance or two points.
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 02:54:45 PM
i see how i can run a script but how do i write one. i got the format but i don't see how to save it with a .scr extension. do i need some software to write them. scratching head...
Title: yet another button question
Post by: daron on February 02, 2004, 03:02:47 PM
Okay, that should've been graphscr, not textscr. Graphscr is similar to hitting F2.

What are you trying to make a script file for? I thought you were putting this in a toolbar.
Title: yet another button question
Post by: ELOQUINTET on February 02, 2004, 03:36:59 PM
yes i did what you said and it works fine. i was just wondering about creating a script for other things i guess i was going off on a tangent. thanks
Title: yet another button question
Post by: daron on February 02, 2004, 03:46:10 PM
Script: notepad and be careful of spaces and wrong command line sequence and... why are you looking into scripts? Nevermind, scripts are a good way to learn the command line sequence. It's a decent starter step for basic lisp.