Autoload Multiline styles?

Discussion in 'AutoCAD' started by John Schmidt, Apr 6, 2004.

  1. John Schmidt

    John Schmidt Guest

    I'm trying to find a way to have some custom multilines get automatically
    loaded at startup. They exist in the acad.mln file, but unless loaded and
    saved with a drawing or template, cmstyle won't allow specifying them.

    The reason I want them loaded at startup is that these selections will be
    included in a custom menu so the user doesn't always have to open up the
    multiline dialog box and load/set them each time they're needed. And since
    these functions will be used in hundreds of existing drawings, it does no
    good to have them loaded into templates, etc.

    'Any suggestions on how to load them either through lisp or some other way?

    Thanks for any suggestions!

    John
     
    John Schmidt, Apr 6, 2004
    #1
  2. John Schmidt

    David Kozina Guest

    Easiest is probably to define them in /a block/s and insert it.
    voila! (But this is a horrible kludge, IMO)

    MLstyles can be entmake'd, btw, which is what I do now - but I'm looking for
    ways to do this with activex stuff... :)

    hth,
    David Kozina
     
    David Kozina, Apr 6, 2004
    #2
  3. John Schmidt

    John Schmidt Guest

    Yeah - I decided on the block insertion method right after I posted. I then
    ssget it, erase, then purge it. 'Not pretty, but it works...below is the
    line in the menu, (it calls a script for actually running the mline at the
    end):

    ^C^C-insert;mlrw.dwg;0,0;;;;(ssget "x" '((2 .
    "mlrw")) );erase;p;;-purge;B;mlrw;n;script;RWall8.SCR

    John
     
    John Schmidt, Apr 6, 2004
    #3
  4. John Schmidt

    David Kozina Guest

    BTW, I believe Tony Tanzillo's AcadX extension library has the means to
    bypass the dialog and load up the definitions in a specified .mln file.

    I haven't tried it for that purpose, but I imagine the code required would
    be pretty simple. This would avoid the block messiness altogether.

    Just another idea.
     
    David Kozina, Apr 6, 2004
    #4
  5. Looked into this briefly, I'm not sure the majority
    of the properties are exposed. Seems that maybe
    the only route (lisp wise) would be vanilla. Anyone
    else know for sure?
     
    Jason Piercey, Apr 7, 2004
    #5
  6. PS: I suppose you could keep a 'dummy'
    drawing around with the desired mline styles
    loaded and access them via objectDBX.

    Just an alternative to the block solution.


    --
    Autodesk Discussion Group Facilitator


    <snip>
     
    Jason Piercey, Apr 7, 2004
    #6
  7. John Schmidt

    David Kozina Guest

    It can be done with AutoLISP. Ugly and cryptic, but effective.

    It was interesting (to me) while working this out
    a long time ago that the .mln file is not much more
    than a dxf-like group code format file.

    MLineStyles are dictionary objects, IIRC, so if one could work out the
    dxf -> activex conversion details, I would think that it would be possible.
    But then again... <shrugs>

    For now, though, I've got other fish to fry...

    I sure wish they'd expose a few more mline object properties, though, like
    justification, and scale.
    and simply being able to put a StyleName would be most awesome! For now I
    have to resort to severe subterfuge to accomplish that...

    Best regards,
    David Kozina
     
    David Kozina, Apr 7, 2004
    #7
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.