Mline load

Discussion in 'AutoCAD' started by DTH, May 19, 2004.

  1. DTH

    DTH Guest

    Hi,
    I needed some help here regarding AutoCAD v14.

    I know there is a way to load linetypes from the command line, and
    therefore, easily place it in a lisp. I cannot seem to find a way to load
    mlstyles from the command line.

    Because of circumstances, already having it in the acad.mln is not an
    option. Another thought is to create the mline style from scratch, but it
    looks like they all need a dialogue box interface.

    Any direction I should be looking in?
     
    DTH, May 19, 2004
    #1
  2. DTH

    ECCAD Guest

    Just a suggestion,
    Make up a 'blank' drawing, load the linetypes, saveas LT.dwg
    Then just insert LT @0,0 in any other drawing..should bring in
    the linetypes needed - from that file (block).

    Bob
     
    ECCAD, May 19, 2004
    #2
  3. DTH

    Rudy Tovar Guest

    (defun c:mline? (/ ob di g&m ml me dm)

    (setq ob (namedobjdict)
    di (entget ob)
    g&m(member (assoc 3 di)di)
    mL (cddr g&m)
    me (nth 3 ml)
    dm (entget(cdr me)))

    (setq rlist (massoc 3 dm))
    (princ rlist)
    (princ)
    )

    (defun massoc (key alist)
    (apply 'append
    (mapcar '(lambda (x)
    (if (eq (car x) key)
    (list (cdr x))
    )
    )
    alist
    )
    )
    )
     
    Rudy Tovar, May 20, 2004
    #3
  4. DTH

    David Kozina Guest

    Inserting a block containing the mlinestyles (as ECCAD/Bob suggested) is
    probably the simplest way/kludge around this *RIDICULOUS*
    *almost-decade-old* obstacle. GRRRR.

    Tony Tanzillo's AcadX Extension library has the means to load an mlinestyle
    from an .mln file (though I haven't personally tried it, it looks pretty
    simple to use).

    You can find it here:
    http://www.caddzone.com/

    You can also entmake an mlinestyle (what I do now), though it's sort of an
    uphill DXF+dictionary-comprehension climb.

    It might be possible to add an mlinestyle dictionary entry in the Object
    Model via the ActiveX functions, but I haven't tried this. (Looks like a
    steeper climb, still, to me, right now)

    Personally, if I had to do it again today, I would use Tony's AcadX, since
    it's "in there" and I've got other fish to fry.

    hth,
    David Kozina
     
    David Kozina, May 20, 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.