Jump to content

Recommended Posts

Posted

I am wanting to create a custom command that will scale a drawing up 25.4 and zoom Extents. The following script file works but I would like it to be a command line command.

 

scale

all

 

0,0,0

25.4

 

Zoom

E.

 

I have tried to use the customize user interface but have had no luck. I keep getting "unknown command".:unsure:

Posted
(defun c:sc254 ()
(setq old_tile (getvar "tilemode"))
(setvar "tilemode" 1)
(command "scale" "all" "" "0,0" 25.4)
(command "zoom" "extents")
(setvar "tilemode" old_tile)
(princ)
)

Posted

Hey how did you edit your post without it showing as edited, I was going to point out some code modifications, but then sudenly the code was revised/corrected :)

Posted

;;; in lisp

(defun c:scmm ()

(command "scale" "all" "" "0,0" 25.4)

(command "zoom" "e")

);_defun

;;; macro for a button

^C^Cscale;all;;0,0;25.4;zoom;e;

Posted
I am wanting to create a custom command that will scale a drawing up 25.4 and zoom Extents. The following script file works but I would like it to be a command line command.

 

scale

all

 

0,0,0

25.4

 

Zoom

E.

 

I have tried to use the customize user interface but have had no luck. I keep getting "unknown command".:unsure:

 

Here it is in MACRO form so that you can create a custom button for it. I tested it in ACAD 09 and it worked just fine.

 

^C^C^PScale;all;;0,0;25.4;^C^Czoom;e;

Or, if you are familiar with LISP I can create a routine for you.

Hope that helps!

Posted
Hey how did you edit your post without it showing as edited, I was going to point out some code modifications, but then sudenly the code was revised/corrected :)

I was a bit hasty, I typed it in the forum. Then I cut/pasted into Vlide, saw my mistakes, deleted the post, then reposted.

 

BTW... I think you can edit a post w/o it showing as edited so long as you don't leave the forum

Posted
I was a bit hasty, I typed it in the forum. Then I cut/pasted into Vlide, saw my mistakes, deleted the post, then reposted.

 

Blimey... you did all that in the time that Carl spotted the mistakes! ~ you are hasty indeed :)

Posted

anything to prevent actually working... Friday

Posted
anything to prevent actually working... Friday

 

I second that. Here in a few hours, I get to play putt-putt to leave 2 hours early. Wish every day were a Friday...

Posted

Thanks all. I will try these out when time permits. YES, it's Friday!!!

Posted
anything to prevent actually working... Friday
LOL looks like there's several of us...
Posted
Here it is in MACRO form so that you can create a custom button for it. I tested it in ACAD 09 and it worked just fine.

 

^C^C^PScale;all;;0,0;25.4;^C^Czoom;e;

 

Or, if you are familiar with LISP I can create a routine for you.

 

Hope that helps!

 

 

The button version is exactly what I was looking for.:)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...