+ Reply to Thread
Results 1 to 6 of 6

Thread: Won't work

  1. #1
    Full Member
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Nov 2017
    Posts
    40

    Default Won't work

    Registered forum members do not see this ad.

    Would anyone know why this line won't work?
    Pt1 ang1 & dist1 are established
    command line error is looking for the first point

    Thank you

    Code:
    (command "_.line" (polar Pt1 (+ ang1 (dtr 9o)) 13) (polar ang1 dist1) "")

  2. #2
    Super Member marko_ribar's Avatar
    Computer Details
    marko_ribar's Computer Details
    Operating System:
    Windows 7 Ultimate X64
    Computer:
    Intel quad core CPU 4x2.66GHz, 8GB RAM
    Motherboard:
    INTEL compatibile
    CPU:
    quad core 4x2.66GHz
    RAM:
    8GB
    Graphics:
    NVIDIA GeForce 6600 GT
    Primary Storage:
    250 GB
    Secondary Storage:
    500 GB
    Monitor:
    Samsung 17''
    Discipline
    Architectural
    marko_ribar's Discipline Details
    Occupation
    Architecture, project designer, project visualisation
    Discipline
    Architectural
    Details
    space design - modeling and animations
    Using
    AutoCAD 2014
    Join Date
    Feb 2010
    Location
    Belgrade, Serbia, Europe
    Posts
    1,276

    Default

    Where is reference point here :

    (polar ??? ang1 dist1)

    (dtr) sub function must be loaded, I suggest :

    (dtr 90) = (cvunit 90 "degree" "radian")


    BTW. Whenever you have command call that involves points input, preferable is that you specify "_non" or "_none" osnap before point spesifications...

    Marko Ribar, d.i.a. (graduated engineer of architecture)
    M.R. on YouTube

  3. #3
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,559

    Default

    You also have "9o" instead of "90":
    Code:
    (dtr 9o)
    I would suggest writing your code using a font which demarcates zeroes using lines through the "0" (such as Consolas) to avoid recurrence of this mistake.

    Please use a more descriptive thread title in future.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  4. #4
    Full Member
    Using
    AutoCAD 2015
    Join Date
    Jun 2017
    Posts
    27

    Default

    9o should be 90 ?

  5. #5
    Full Member
    Discipline
    Construction
    Using
    AutoCAD 2018
    Join Date
    Nov 2017
    Posts
    40

    Default

    Thank you all very much for the feedback.
    I must have looked at that line of code 100 times and never spotted the problem with "9o"

  6. #6
    Quantum Mechanic BIGAL's Avatar
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    10,581

    Default

    Registered forum members do not see this ad.

    Yeah like the others instant 9o

    Code:
    (/ pi 2.0) or (dtr 90) or (setq a90 (/ pi 2.0)) if you need to use angle 90 a lot.
    (polar pt1 a90 dist)
    A man who never made mistakes never made anything

Similar Threads

  1. Replies: 2
    Last Post: 30th Sep 2011, 07:19 pm
  2. Replies: 33
    Last Post: 27th Jul 2011, 06:27 pm
  3. Rotating Already Defined Work Planes and Work Axis's
    By Randy Chard in forum AutoCAD 3D Modelling & Rendering
    Replies: 3
    Last Post: 27th Mar 2009, 02:08 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