MLineStyle loading problem... (VBA)

Discussion in 'AutoCAD' started by Maksim Sestic, Jan 6, 2004.

  1. Is there any example of how to load saved MLine Style (.MLN) into the
    dictionary via VBA? The rest of how to use the MLineStyle, etc. is well
    known, but loading it from file...?

    As all other efforts to load the .MNL programmatically failed, I was forced
    to cerate .dwt template with preloaded MLineStyle in it. It looks a horrible
    solution to me.

    Thanks for any tip,
    Maksim Sestic
     
    Maksim Sestic, Jan 6, 2004
    #1
  2. Maksim Sestic

    David Kozina Guest

    How about inserting a block that contains the mlinestyle you need, then
    deleting the block? We did that for some time (not via vba, but I don't see
    why you couldn't do it just as easily that way), and it worked fairly well
    for our needs.
     
    David Kozina, Jan 6, 2004
    #2
  3. I think I tried that approach already, but I'll try it again. Strange thing
    that there is NO mention of loading .MLN MLineStyles anywhere down the NG...

    Regards,
    Maksim Sestic
     
    Maksim Sestic, Jan 8, 2004
    #3
  4. Yes, it's working. Although, I would like to load it programatically but
    there is no hint of how to do it.

    Regards,
    Maksim Sestic
     
    Maksim Sestic, Jan 10, 2004
    #4
  5. Maksim Sestic

    David Kozina Guest

    Maksim,
    You can create an mlinestyle programmatically (it's not extremely easy, but
    possible) using AutoLISP. I don't know if it's possible to do so with vba.
    (I've looked for "Eureka!" announcements of success in this group, but
    haven't seen any thus far, fwiw).

    If you're inclined to give AutoLISP a shot, here's some example code showing
    one way you might be able to do this (the mlinestyle code is near the end of
    the first link):

    http://xarch.tu-graz.ac.at/autocad/stdlib/ENTMAKE.LSP

    help/explanations:
    http://xarch.tu-graz.ac.at/autocad/stdlib/docs/STDLIB.HLP

    Also see the .dxf group code references in the main AutoCAD help files
    relating to mlines and mlinestyles.

    hth,
    David Kozina
     
    David Kozina, Jan 10, 2004
    #5
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.