+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    AutoCAD 2007
    Join Date
    Oct 2006

    Default some help needed

    Registered forum members do not see this ad.

    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)))
    (setq rad(cdr(assoc 40 enlist)))
    (setq Tic (* rad 0.5))
    (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)

  2. #2
    Super Member
    AutoCAD 2007
    Join Date
    Aug 2003
    Livingston, Scotland


    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)
    A 2D or 3D point.
    An angle expressed in radians relative to the world X axis. Angles increase in the counterclockwise direction, independent of the current construction plane.
    Distance from the specified pt.
    Return Values
    A 2D or 3D point, depending on the type of point specified by pt.
    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 ?
    ResourceCAD.... the Resource for your CAD Solutions

  3. #3
    Super Member Mr T's Avatar
    AutoCAD 2007
    Join Date
    Nov 2002
    Loch Oich SCOTLAND...


    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.

    http://www.flickr.com/photos/80049703@N00/ http://mtbnick.fotopic.net/

    High School Classroom - 21 AutoCAD 2007, Inventor 11, COREL Draw & Paint 11. Very Unreliable Network.

    Home - AMD 2.1GHZ - 512Ram, 64 Video,
    Laptop Inventor 7, Autocad 2004, Corel 11

Similar Threads

  1. Help Needed
    By Rebbeca in forum AutoCAD General
    Replies: 2
    Last Post: 30th Oct 2006, 02:31 pm
  2. Greetings first,help needed second!
    By dspin in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 22nd Aug 2006, 05:11 pm
  3. A 3D command needed
    By HUGIN in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 21st May 2006, 05:26 pm
  4. Help Needed Please.!!
    By Tack in forum AutoCAD General
    Replies: 5
    Last Post: 23rd Mar 2006, 09:58 pm
  5. Help needed!!!
    By Assis_111 in forum AutoCAD General
    Replies: 5
    Last Post: 5th Jun 2003, 05:25 am


Posting Permissions

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