osnap help

Discussion in 'AutoCAD' started by GaryDF, Aug 12, 2004.

  1. GaryDF

    GaryDF Guest

    What is the best way to write the code for inserted an unequally scale
    block with osmode set at 111 for the insetion point and osmode set
    to zero for the rotation point, or osnap set to none?

    (defun ARCH:RTD (r) (/ (* r 180.0) pi))

    (defun C:TEST (/ pt1 pt2 ang rot)
    (setvar "osmode" 111)
    (setq pt1 (getpoint "Pick insertion point for block"))
    (setq pt2 (osnap (getpoint pt1 "Pick point for rotaion of block") "non")) ;;<
    need help here
    (setq ang (angle pt1 pt2))
    (setq rot (ARCH:RTD ang))
    (command ".insert" "blknam" pt1 "1.5" "1.0" rot)
    )

    Gary
     
    GaryDF, Aug 12, 2004
    #1
  2. GaryDF

    dblaha Guest

    (defun C:TEST (/ pt1 pt2 ang rot)
    (setvar "osmode" 111)
    (setq pt1 (getpoint "Pick insertion point for block"))
    (setvar "osmode" 0)
    (setq pt2 (getpoint pt1 "Pick point for rotaion of block"))
    (setq ang (angle pt1 pt2))
    (setq rot (ARCH:RTD ang))
    (command ".insert" "blknam" pt1 "1.5" "1.0" rot)
    )
     
    dblaha, Aug 12, 2004
    #2
  3. GaryDF

    GaryDF Guest

    Thanks....I couldn't see the forest or the trees

    Gary
     
    GaryDF, Aug 12, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.