Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple picks in Autocad 4

Status
Not open for further replies.

Opus272000

Mechanical
Feb 3, 2003
4
Does anyone know how to write a macro for creating multiple pics? I often have to add dots to some 2d drawings to give them a more 3d effect. to do this I draw a small circle and copy it many many times. It wears me down after a few sheets. I wanted to know if htere was a way to hold down a key while moving the mouse around. Kind of like the spray feature in adobe photoshop.

 
Replies continue below

Recommended for you

Would the donut command do the job? It's faster than multiple circle copying. But having said that, why not polyline the area for shading and use a hatch pattern of similar fashion?
 
If your version of AutoCAD allows you to use a lisp program,
then you can create a lisp routine to do the work you want done automatically.
 
I would hatch it in but the reason for stippling is to show slight dimples or irregular rounding of a surface. Some areas have much more stippling than others in order to show concave or convex. It needs to be done with a point of some sort so it can be copied many times with a standard copier.
 
The only "native" command I can think of that works in that manner would be the "sketch" command.
Type Sketch
click once on the screen and just move the mouse.
When you done click the mouse to stop drawing.
.
.
But I'm not sure if that's the same effect you want as the dots. The sketch command is one long "sqiggly" polyline.
.
.
Just a thought.
Rich [roll1]
 
Opus,

Try out this routine (asuming you are not using LT).

It draws points as you drag your cursor. Left click to stop drawing. If you want to draw a small circle, insert a block, etc you'll just need to change one line. Let me know how it works.

Carl
------------------------------------------------

(princ "Type SPRAY to start")
(defun c:spray ()
(setvar "cmdecho" 0)
(setq CurRead T TimeTol 0.0000002)
(setq OldTime (getvar "CDATE"))
(while CurRead
(setq ReadStuff (grread T 5 0)
NewTime (getvar "CDATE")
DeltaTime (- NewTime OldTime)
SprayFlag (if (> DeltaTime TimeTol) T nil)
);
(if (/= (car ReadStuff) 5) (setq CurRead nil))
(if SprayFlag
(progn
(setq Pt (cadr ReadStuff))
(entmake (list '(0 . "POINT") (cons 10 Pt)))
;;(command "point" Pt)
(setq OldTime NewTime)
);progn
);if
);while
(princ)
);defun
 
CarlB,

THAT'S IT !!!! just one thing. how would I change the points to circles with a radius of .0025?

Thanks so much. I've been trying for years to figure that out. :)
 
Opus,
You're welcome.
And to use circle with radius with of 0.0025, change the line

(entmake (list '(0 . "POINT") (cons 10 Pt)))

to

(entmake (list '(0 . "CIRCLE") (cons 10 Pt) (cons 40 0.0025)))

And to place objects faster or slower you can play with the value of "TimeTol 0.0000002",
for example 0.0000001 would place them twice as fast.

Carl
 
AHHHH ! Thank you! I have spent hours working on drawings picking every single circle. after about 30,000 my arm really hurts. Now I can get my work done without fears of carple tunnel. Thank you , thank you, Thank you. You cant imageine how great this is for me.

[2thumbsup] [spin] [wavey2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor