Error Messages

Discussion in 'AutoCAD' started by Leothebuilder, Aug 8, 2004.

  1. Hi there,

    I've put together some simple stuff to insert blocks on their correct layer.
    If the layer doesn't exist, or no longer exists because of a purge, it
    creates
    the layer, color etc.

    The routines work ok, but I get error messages saying "unkown command"
    Would anyone have a suggestion how to get rid of these ?

    (DEFUN C:2412 () (COMMAND "CMDECHO" "0")
    (COMMAND "-LAYER" "M" "E-ELEC-CEIL-SYMB" "C" "1" "" "")
    (COMMAND "INSERT"
    "C:/ABLOCKS/ELECTRICAL/CEILINGMOUNT/24-12RECESSFLURO.DWG" PAUSE "1" "0"
    "0"""))
    (DEFUN C:4812 () (COMMAND "CMDECHO" "0")
    (COMMAND "-LAYER" "M" "E-ELEC-CEIL-SYMB" "C" "1" "" "")
    (COMMAND "INSERT"
    "C:/ABLOCKS/ELECTRICAL/CEILINGMOUNT/48-12RECESSFLURO.DWG" PAUSE "1" "0"
    "0"""))

    I've also got a problem with the menu
    When I use the [--] to create a visual demarkation, the menu litterally
    shows only -- and not
    the nice visual division line as in the cad menu's. Any fix ?

    Thanks

    Leo
     
    Leothebuilder, Aug 8, 2004
    #1
  2. Leothebuilder

    zeha Guest

    Leo,

    I wonder that this works

    The x scale is set to 1
    The y scale is set to 0
    The rotation angel 0

    if i try this i get the message

    Value must be nonzero.
    I use most the follow construction:
    (COMMAND ".INSERT""C:/ABLOCKS/ELECTRICAL/CEILINGMOUNT/24-12RECESSFLURO.DWG" "Scale" "1" "Rotate" "0")

    Note at the scale and rotate is place before the insertion point

    The unknown command is from the extra unnecessary enter at the end

    Another way to combine al these functions to one is the follow

    (DEFUN insBlocks ( LAYERNAME COLOR BNAME / )
    (SETVAR "CMDECHO" 0)
    (SETQ OLDLAYER (GETVAR "CLAYER"));get the current layername
    (COMMAND ".LAYER" "M" LAYERNAME "C" color "" "")
    (COMMAND ".INSERT" "SCALE" "1" "ROTATE" "0")
    (SETVAR "CLAYER" OLDLAYER);set the layer to the old layername
    )

    (insBlocks "E-ELEC-CEIL-SYMB" "1" "C:/ABLOCKS/ELECTRICAL/CEILINGMOUNT/24-12RECESSFLURO.DWG")

    ; and

    (insBlocks "E-ELEC-CEIL-SYMB" "1" "C:/ABLOCKS/ELECTRICAL/CEILINGMOUNT/48-12RECESSFLURO.DWG")

    cheers and good luck

    Harrie
     
    zeha, Aug 8, 2004
    #2
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.