1. ## some help needed

this is the last part of my lisp program which was drawing the centerlines of the circle, shown below, could someone please give me some information on how it works, what the function of each lines are please, this lisp routine is so difficult to understand

;;=== drawing centerlines for circles
(setq Count 0)
(setq CircleSet (ssget '((0 . "CIRCLE"))))
(repeat (sslength CircleSet)
(setq enlist (entget (ssname Circleset Count)))
(setq cpt(cdr(assoc 10 enlist)))
(command "line"
(polar cpt pi Tic) ;180 degrees
(polar cpt 0 Tic) ;0 degrees
""
)
(command "line"
(polar cpt (* pi 0.5) Tic) ;90 degrees
(polar cpt (* pi 1.5) Tic) ;270 degrees
""
)
(setq Count (+ 1 Count));;increment counter
)
;;;--- Turn the command echo back on
(setvar "cmdecho" 1)
(princ)

2. earler you said only 3 lines, now you are saying "all these lines"

as suggested by someone earler in one of your earlier posts... I think you would find it a lot quicker to select a word and look it up in the developers help.. and you would get more benefit that way... you tend to remember things more if you have to find them by yourself rather than have everyone just tell you their version.

Select the word in the Vlide and lick on the ? icon ~ it will take you straight to the help topic on that word.

like this....
POLAR Function
Returns the UCS 3D point at a specified angle and distance from a point
(polar pt ang dist)
Arguments
pt
A 2D or 3D point.
ang
An angle expressed in radians relative to the world X axis. Angles increase in the counterclockwise direction, independent of the current construction plane.
dist
Distance from the specified pt.
Return Values
A 2D or 3D point, depending on the type of point specified by pt.
Examples
Supplying a 3D point to polar:
Command: (polar '(1 1 3.5) 0.785398 1.414214)
(2.0 2.0 3.5)
Supplying a 2D point to polar:
Command: (polar '(1 1) 0.785398 1.414214)
(2.0 2.0)
now, what more explanation would you need ?

3. Registered forum members do not see this ad.

....learning by doing it yourself....

Yes, Kinaestheitc learning, being pushed in my school at the moment.

Good luck in your LISP learning, I have not started that yet, too busy wanting to develop add-ins for Inventor.

Nick

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts