IVSETUP autolisp to be improved similar to AutoCad MVSETUP

Here's the IVSETUP autolisp code which we hope can be improved towards the similarity of AutoCad's MVSETUP

Thanks!

Comments

  • Hi Arthur,

    Does anyone actually use MVSETUP?? It is a rather arcane feature, which has been largely superseded by newer methods. This is of course my own opinion, you may have a perfectly valid reason for using it.

    Personally I use pre-configured templates with the _LAYOUT command to import them onto my drawings, as required. This has the advantage of also pulling through print settings as well.

    I have an example of this in a sample CAD library I've created for Bricscad, or try for yourself using the following line of code.

    [code](command "._LAYOUT" "TEMPLATE" "YourTemplate.dwt" "YourLayoutName")[/code]

    Note that the template must be on your support search path.

    Regards,

    Jason Bourhill

    CAD Concepts


  • Jason,

    I know MVSETUP is old and out-dated but there are still people using it. Especially, those who are still on older versions of AutoCAD.

    We are trying to tell users the benefits of newer methods while still trying to see if we can provide MVSETUP to them for their comfort and to show that 'you can use MVSETUP also' - for whatever it is worth.

    Regards
    Rakesh Rao
    http://rakeshrao.typepad.com

  • Hi there,

    Please help me, I've tried to load the IVSETUP.lsp to Bricscad V12 but its not working......

    error : malformed list on input at [READ] : File

    this error occured in the command window.

    Thanks,

    lady

  • Hi Lady,

    Have you been working on the IVSETUP.LSP file to change it in some way? The routine posted by Arthur works fine for me. If you didn't intend to change it I would simply download it again.

    Malformed list error is generally caused by two mistakes commonly made by lisp coders, myself included :)
    1. A closing speech mark is missing from a text string
      For example
      [code]
      (entsel "\nSelect something: ") ; This will work.
      (entsel "\nSelect something: ) ; This won't work because the closing speech mark is missing from the prompt.
      [/code]
    2. A closing bracket is missing from a sequence of code.
      For example
      [code]
      (cdr(assoc 8 (entget(car(entsel "\nselect something: "))))) ; This will return the Layer name for the selected object.
      (cdr(assoc 8 (entget(car(entsel "\nselect something: ")))) ; This won't work because it has a closing bracket missing.
      [/code]

    The can be very frustrating to find, particularly when it is someone elses code that your not familiar with. If you are going to work with LISP having a text editor that matches brackets for you is very useful, such as Notepad ++ (maybe some others could suggest a good lisp editor).


    Other things to consider are formating of your code for readability, making use of comments, and avoiding overly nesting functions (sometimes a few extra setq, and breaking down code to a number of small functions can go a long way to avoiding code issues).

    e.g.
    [code]
    ; This will return the Layer name for the selected object
    ; formatted for readability, which helps due to the level of nesting.
    (cdr
        (assoc 8
            (entget
                (car
                    (entsel "\nselect something: ")
                ) ;end car
            ) ;end entget
        ) ;end assoc
    )  ;end cdr[/code]



    Regards,

    Jason Bourhill

    CAD Concepts


This discussion has been closed.