(Entmod)ing an mlstyle

Discussion in 'AutoCAD' started by Cliff Davis, Sep 16, 2003.

  1. Cliff Davis

    Cliff Davis Guest

    I am using the following code to try to change all mline entities to bylayer
    color. I am getting nil returned on all entmods except for the "Standard"
    style. This is my first time dealing with dictionarys and must be missing
    something key.

    (defun temp ()
    (setq named_object (entget (cdr (assoc -1 (dictsearch (namedobjdict)
    "acad_mlinestyle")))))
    (repeat (length named_object)
    (if (= (car (car named_object)) 350)
    (progn
    (setq ml_style (entget (cdr (car named_object))))
    (repeat (+ 1 (setq ml_style_count (- (length ml_style) 1)))
    (if (= (car (nth ml_style_count ml_style)) 62)
    (setq ml_style (subst (cons 62 256) (nth ml_style_count
    ml_style) ml_style))
    )
    (setq ml_style_count (- ml_style_count 1))
    )
    (princ (entmod ml_style))
    )
    )
    (setq named_object (cdr named_object))
    )
    )

    Any direction is appreciated.
    Thanks
    Cliff
     
    Cliff Davis, Sep 16, 2003
    #1
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.