+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Super Member chulse's Avatar
    Computer Details
    chulse's Computer Details
    Operating System:
    Windows 7
    Computer:
    Lenovo W701 mobile workstation
    RAM:
    12GB
    Graphics:
    NVIDIA Quadro FX 3800M
    Monitor:
    17" wide screen laptop w/ 22" acer
    Discipline
    See details...
    chulse's Discipline Details
    Occupation
    Conservation Planner/Arborist
    Discipline
    See details below.
    Details
    Tree Preservation Planning for civil design and developent
    Using
    Civil 3D 2013
    Join Date
    Jul 2007
    Location
    Front Royal, Virginia
    Posts
    1,313

    Default UCS WORLD without the UCS command call?

    Ok, I found this little gem (a reactor to do various things on file close) from ASMI. What I'd like is to have it also automatically set the UCS to world on file close.
    If I understand correctly that you cannot use "command" in a reactor (read here that I am completely new to reactors...and almost completely new to lisp...), is there another method for changing the UCS back to world that would work?

    Thanks
    Cary Hulse
    Conservation Planner
    www.TreePreservationPlan.com
    www.Pack53.info

  2. #2
    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
    16,737

    Default

    I'm not sure of any other way to do it other than by creating a temporary UCS:

    Code:
    (defun UCSWorld (/ doc tmp)
      (setq doc (vla-get-ActiveDocument
                  (vlax-get-acad-object)))
      
      (vla-put-ActiveUCS doc
        (vla-add (vla-get-usercoordinatesystems doc)
          (vlax-3D-point '(0. 0. 0.))
            (vlax-3D-point '(1. 0. 0.))
              (vlax-3D-point '(0. 1. 0.)) "TempWord_UCS")))
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  3. #3
    Super Member chulse's Avatar
    Computer Details
    chulse's Computer Details
    Operating System:
    Windows 7
    Computer:
    Lenovo W701 mobile workstation
    RAM:
    12GB
    Graphics:
    NVIDIA Quadro FX 3800M
    Monitor:
    17" wide screen laptop w/ 22" acer
    Discipline
    See details...
    chulse's Discipline Details
    Occupation
    Conservation Planner/Arborist
    Discipline
    See details below.
    Details
    Tree Preservation Planning for civil design and developent
    Using
    Civil 3D 2013
    Join Date
    Jul 2007
    Location
    Front Royal, Virginia
    Posts
    1,313

    Default

    Thanks Lee!
    Cary Hulse
    Conservation Planner
    www.TreePreservationPlan.com
    www.Pack53.info

  4. #4
    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
    16,737

    Default

    Quote Originally Posted by chulse View Post
    Thanks Lee!
    You're welcome - its not perfect, and a bit of a workaround - I would welcome anyone to submit a better way.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  5. #5
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,143

    Default

    Quote Originally Posted by Lee Mac View Post
    You're welcome - its not perfect, and a bit of a workaround - I would welcome anyone to submit a better way.
    Thanks how I would do it.
    I used the same coding to do the same thing a while back. I just called it "World" and left it there.
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  6. #6
    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
    16,737

    Default

    Quote Originally Posted by alanjt View Post
    Thanks how I would do it.
    I used the same coding to do the same thing a while back. I just called it "World" and left it there.
    I think I picked it up from somewhere in theSwamp - I wish there was a better way to do it.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  7. #7
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,143

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Lee Mac View Post
    I think I picked it up from somewhere in theSwamp
    Same here.
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

Similar Threads

  1. why dose VBA not call my lisp command?
    By looseLISPSsinkSHIPS in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 17th Feb 2010, 02:09 pm
  2. call function?
    By comcu in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 10th Jun 2008, 12:31 pm
  3. not sure what to call this one!
    By alec in forum AutoCAD Drawing Management & Output
    Replies: 6
    Last Post: 11th Sep 2007, 10:59 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