Entmake Layer Error

Discussion in 'AutoCAD' started by crrussell3, Apr 2, 2004.

  1. crrussell3

    crrussell3 Guest

    Yes,
    I am having problems creating a layer/color using entmake. Whenever the function is called, it spits out this message:

    error: bad DXF group: (62 . "7")

    I can tell that my problem is the color code is being entered as a string, when it should be entered as an intger. But yet I thought that is what I had it programed to do.

    I did find a way to cheat the code, by setting val = value, and wrapping the (nth (atoi val) recp_colr_list) with another (atoi), but I shouldn't have to do that. Where am I going wrong? This is my first time experimenting with entmake.

    Code:
    (DEFUN RecpLayr	(val)
    (SETQ	recp-layr (NTH (ATOI val) recp_layr_list) ;;set recp-layr to list value
    recp-colr (NTH (ATOI val) recp_colr_list) ;;set recp-colr to list value
    ) ;_ end of SETQ
    (IF (NOT (TBLSEARCH "layer" recp-layr))
    (PROGN
    (ENTMAKE
    (LIST
    '(0 . "LAYER")
    '(100
     
    crrussell3, Apr 2, 2004
    #1
  2. crrussell3

    Jeff Mishler Guest

    Without seeing how the list "recp_colr_list" is constructed there' no way to
    tell. It DOES mean that the list is being created with a string value.

    Jeff

    function is called, it spits out this message:
    when it should be entered as an intger. But yet I thought that is what I
    had it programed to do.
    the (nth (atoi val) recp_colr_list) with another (atoi), but I shouldn't
    have to do that. Where am I going wrong? This is my first time
    experimenting with entmake.
     
    Jeff Mishler, Apr 2, 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.