+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default y coordinate getting assigned to 0

    Registered forum members do not see this ad.

    my coding

    Code:
     
        (setq   p20(polar p1 A1 6)
           p21(polar p20 A2 6)
           p22(polar p21  A1 (-(/ Dia 2.0)12))
           p23(polar p22 A2 63)
           p24(polar p23 A3 (-(/ Dia 2.0)12)) 
    
    (command "pline" p21 p22 p23 p24 "c")
    y coordinate getting assigned to 0
    what could be the reason
    ?
    Last edited by SLW210; 14th May 2011 at 11:00 pm. Reason: Placed code in tags

  2. #2
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,629

    Default

    It could be the osmode .

    Try it this way .

    Code:
    (setq os (getvar 'osmode))
    (setvar 'osmode 0)
    (command "pline" p21 p22 p23 p24 "c")
    (setvar 'osmode os)
    Or this .

    Code:
    (command "pline" "_non" p21 "_non" p22 "_non" p23 "_non" p24 "c")
    Hope this help .

    Tharwat

  3. #3
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default

    thanks, i will try and reply.

  4. #4
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,106

    Default

    Code:
     
    (progn
    (command "pline" "_non")
    (foreach pt (list (setq p21 (polar p20 A2 6))
                      (setq p22 (polar p21 A1 (- (/ Dia 2.0) 12)))
                      (setq p23 (polar p22 A2 63))
                      (setq p24 (polar p23 A3 (- (/ Dia 2.0) 12))))
          (command pt "_non")
          )
    (command "")
    )

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,734

    Default

    Kalai,

    Please read this regarding posting code.

    Lee
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  6. #6
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,124

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Lee Mac View Post
    Kalai,

    Please read this regarding posting code.

    Lee
    I took care of it this time, please use "Code Tags" from now on.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



Similar Threads

  1. Xref attach: Relative path cannot be assigned... huh?
    By MarcoW in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 28th Sep 2010, 03:50 pm
  2. Draw order assigned to wipeout blocks?
    By TimZilla in forum AutoCAD Drawing Management & Output
    Replies: 10
    Last Post: 13th May 2010, 03:04 pm
  3. Drawing a 2D objects with assigned coordinates
    By xtrael in forum AutoCAD Beginners' Area
    Replies: 1
    Last Post: 6th Mar 2010, 09:20 pm
  4. How to get the linetype assigned to a layer
    By ILoveMadoka in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 11th Feb 2009, 02:03 pm
  5. Do lines have dates assigned to them?
    By JATS101 in forum AutoCAD Drawing Management & Output
    Replies: 7
    Last Post: 9th Jul 2007, 11:33 pm

Bookmarks

Posting Permissions

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