Print Page | Close Window

Creating Macros

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5593
Printed Date: 23.Apr.2026 at 03:41


Topic: Creating Macros
Posted By: benny
Subject: Creating Macros
Date Posted: 28.Mar.2011 at 06:06
hello,
 
hopefully someone can help me. I havent had to create macros or used macros for over a year and have forgotten some of the basics.
 
the couple of main ones want to start with are:
 
-what to have a macro where it sets to a certain Layer and then starts drawing a line.
 
-again sets to a certain Layer and then does a hatch. so what to click the button and then click in a box and the hatch i want is allready preset.
 
Hopefully that makes sense.
 
thanks.



Replies:
Posted By: John Connor
Date Posted: 28.Mar.2011 at 12:09
Macros cannot make use of dialog boxes so you will have to use the command line version of the commands you want to use.  For example, here is a macro that will start a line on a newly defined layer called "pipe".
 
^C^C-layer;make;pipe;color;red;;;line;endpoint;


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: benny
Date Posted: 28.Mar.2011 at 22:11
ok thanks for that but had figured it out again.



Print Page | Close Window