Problem Inserting 3D blocks using AutoLISP

Discussion in 'AutoCAD' started by Phil Hines, Feb 4, 2004.

  1. Phil Hines

    Phil Hines Guest

    I have created an AutoLISP program that uses the "_-insert" command to place
    4 or 5 3D blocks into a drawing, at different x, y and z positions. When I
    run the program, the blocks get inserted in different locations from what I
    specified.
    Sometimes, randomly, the blocks get inserted in the correct positions.
    I also noticed that, if I run the program while in a Top view, the blocks
    are all inserted in the same z-plane (even though I specified different z
    locations). Has anyone had experience with this? Could this be an AutoCAD
    bug? I can get this to occur in AutoCAD 2000 and AutoCAD 2004. Any ideas
    would be helpful.

    Thank you,
    Phil Hines
     
    Phil Hines, Feb 4, 2004
    #1
  2. Phil,

    Sounds like it might be a UCS translation problem. Look up the (trans)
    function in the AutoLISP reference of your help.
     
    Phil Kenewell, Feb 4, 2004
    #2
  3. Phil Hines

    The real JD Guest

    If you're set at different zoom levels affects the outcome. save the osmode
    variable then set it to zero while running through the lisp. then reenable
    it at the end. Just a thought..
     
    The real JD, Feb 4, 2004
    #3
  4. Phil Hines

    Phil Hines Guest

    JD, you hit it on the head! It now works the way I want it to.
    Thanks to both of you for your help and suggestions.

    Phil
     
    Phil Hines, Feb 4, 2004
    #4
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.