Improvement on Visual LISP DCL Interface

Discussion in 'AutoCAD' started by Laurie Comerford, Aug 11, 2004.

  1. Hi,

    The vibes coming out of Autodesk are that they will continue to support Lisp
    into the foreseeable future.

    Development is all taking place with .NET and except for the features of
    lisp which still aren't available with VBA and .NET you'd be mad to put a
    major effort into using Lisp.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    user friendly as AutoCAD VBA. I am looking for the simillar interface that
    can handle VLISP functions, DCLs, actions and reactors under a single file
    enfvironment(e.g. *.dvb in AutoCAD VBA). DCL tiles have only one Click
    event. We cannot define other events. There is no tile for MTEXT. If like
    this, I suspect, VB will completely replace the VLISP in near future. I
    have seen the Object DCL also. But, it does not meet the standard of VBA. I
    want to know, whether the VLISP developer have already started their any
    actions on these issues.
     
    Laurie Comerford, Aug 11, 2004
    #1
  2. Laurie Comerford

    Ratnakar Guest

    As far I believe, VLISP has a DCL interface, but it is not so easy and user friendly as AutoCAD VBA. I am looking for the simillar interface that can handle VLISP functions, DCLs, actions and reactors under a single file enfvironment(e.g. *.dvb in AutoCAD VBA). DCL tiles have only one Click event. We cannot define other events. There is no tile for MTEXT. If like this, I suspect, VB will completely replace the VLISP in near future. I have seen the Object DCL also. But, it does not meet the standard of VBA. I want to know, whether the VLISP developer have already started their any actions on these issues.
     
    Ratnakar, Aug 11, 2004
    #2
  3. Given the current situation, I don't see much of a
    future for LISP (and certainly not DCL). You can
    think of it as having gone into 'maintainence mode',
    where it is not enhanced, and remains only for the
    purpose of supporting legacy applications.

    Learn to use other programming languages. If you
    do not, you cannot be competitive.



    user friendly as AutoCAD VBA. I am looking for the simillar interface that
    can handle VLISP functions, DCLs, actions and reactors under a single file
    enfvironment(e.g. *.dvb in AutoCAD VBA). DCL tiles have only one Click
    event. We cannot define other events. There is no tile for MTEXT. If like
    this, I suspect, VB will completely replace the VLISP in near future. I
    have seen the Object DCL also. But, it does not meet the standard of VBA. I
    want to know, whether the VLISP developer have already started their any
    actions on these issues.
     
    Tony Tanzillo, Aug 11, 2004
    #3
  4. Laurie Comerford

    Doug Broad Guest

    In addition to what the others have said, AutoLISP in 2005
    seems to run about half as fast as it did on 2004. ADT2005
    consumes 50% more memory than ADT2004 does when running.
    That extra ram draw slows down LISP applications.



    AutoCAD VBA. I am looking for the simillar interface that can handle VLISP functions,
    DCLs, actions and reactors under a single file enfvironment(e.g. *.dvb in AutoCAD VBA).
    DCL tiles have only one Click event. We cannot define other events. There is no tile for
    MTEXT. If like this, I suspect, VB will completely replace the VLISP in near future. I
    have seen the Object DCL also. But, it does not meet the standard of VBA. I want to know,
    whether the VLISP developer have already started their any actions on these issues.
     
    Doug Broad, Aug 11, 2004
    #4
  5. Laurie Comerford

    j.buzbee Guest

    ObjectDCL exceeds the standard of VBA. Can a VBA form interact with the
    "command" function? Believe me, if you want to stick with lisp for in-house
    applications you can't beat ObjectDCL. Let me know if you want to see any
    examples . . ..

    user friendly as AutoCAD VBA. I am looking for the simillar interface that
    can handle VLISP functions, DCLs, actions and reactors under a single file
    enfvironment(e.g. *.dvb in AutoCAD VBA). DCL tiles have only one Click
    event. We cannot define other events. There is no tile for MTEXT. If like
    this, I suspect, VB will completely replace the VLISP in near future. I
    have seen the Object DCL also. But, it does not meet the standard of VBA. I
    want to know, whether the VLISP developer have already started their any
    actions on these issues.
     
    j.buzbee, Aug 11, 2004
    #5
  6. It seems that some of the opinions here are a bit extreme.

    I have, as well as others, been very successful with Lisp. In recent years, introduction of the Visual and ActiveX functionalities have continued to enhance what was already a powerful language with a lot of potential applications that many have never considered.

    Although I will admit that the DCL has many shortcomings, Object DCL makes up for those and can be used to create some very ergonomic, flexible dialogs. The statement about Object DCL being insufficient could only be true in rare situations. For the vast majority of applications, it works great.

    The addition of ActiveX capability makes it apparent that Autodesk realizes the huge number of users that have invested hundreds of millions of hours in Lisp-based development and has no plans on leaving them hanging.

    What a smart programmer who has a lot invested in Lisp WILL do, however, is enhance their existing source code so that is uses much more of the ActiveX and less of the DXF-type functionality. What I've found is that there is a processing speed increase of about 250%, based on benchmark tests that I have developed that compares the two systems.

    I know that VLisp has it's limitations, just like any other language, which is one of the reasons there are so many out there, but it still is a very powerful tool and I really do think that it'll be around for quite a while.

    I know VLisp won't be as effective as some other object-oriented languages as future applications move more in that direction, so I plan on transitioning my programming efforts to C++ and ObjectARX after I learn to use those languages.
     
    Nick_Merchant, Aug 11, 2004
    #6
  7. Laurie Comerford

    Doug Broad Guest

    Hi Herman,
    Well I hadn't really done any testing and had pulled that number
    out of my hat but here are some hard numbers that might come
    as an unpleasant surprise. I performed the same task with several
    versions on the same machine:

    AutoCAD 2002: 1.7970 seconds (faster than R14)
    AutoCAD 2004: 2.05 seconds
    AutoCAD 2005: 3.17 seconds
    AutoCAD 2005 with ADT loaded: 11.078 seconds.

    So in just 3 years, Autodesk has managed to slow this LISPer
    and his legacy applications by a factor of 6 and in just one
    year by a factor of 5.4. (much worse than I previously guessed).

    Regards,
    Doug
     
    Doug Broad, Aug 12, 2004
    #7
  8. Hi Doug,

    I have also seen the decrease in speed with the release of 2005, but (Read my post below) I have also found that refraining from using (ENTGET) or (COMMAND) or (ENTMOD) and other DXF-based commands and substituting them with (VL-) (VLA-) or (VLAX-) ActiveX methods will more than make up for that processing speed. It will also extend and enhance your control of AutoCAD objects and allow easier access to the drawing database and external applications. It will also shorten your code considerably.

    I mainly work on a VLisp application that is over 800K after being compiled and I was able to convert most of it to use ActiveX functionality in about a week. It was well worth the time spent because everything works so much faster now.

    There's a whole new world of programming capabilities open to those who take the time to explore ActiveX in VLisp.

    Check it out. VLisp is still an awesome tool, IMHO.
     
    Nick_Merchant, Aug 12, 2004
    #8
  9. Laurie Comerford

    Ratnakar Guest

    Thank You for the good news you wrote in the reply. In fact, I am very fond of using LISP. Although, I am equally famillier with VB/VBA, I prefer LISP because I feel it very simple and short. Speed is not a matter at present for me. As I see, there are new additions in AutoCAD commands in every releases but there are no any changes in VLISP since last 2-3 releases. I see still many things remaining to do for its development. Could you please give me any contacts of the VLISP developer team.
     
    Ratnakar, Aug 12, 2004
    #9
  10. Hi,

    I think you misread my initial reply.

    Note: This is opinion and not necessarily fact:

    I don't think there is a VLisp developer team. Development in that area has
    stopped and all they are doing is maintaining
    existing lisp functionality.

    If there is a VLisp developer team, the only way you could access it is by
    joining the Autodesk Developer Network.

    Without reading the formal agreement for that, I would still expect that it
    would not be behoven on anyone to publish names of Autodesk Developer team
    members here.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    fond of using LISP. Although, I am equally famillier with VB/VBA, I prefer
    LISP because I feel it very simple and short. Speed is not a matter at
    present for me. As I see, there are new additions in AutoCAD commands in
    every releases but there are no any changes in VLISP since last 2-3
    releases. I see still many things remaining to do for its development. Could
    you please give me any contacts of the VLISP developer team.
     
    Laurie Comerford, Aug 12, 2004
    #10
  11. Laurie Comerford

    Doug Broad Guest

    Nick,
    Hi. Thanks for the encouragement. I am very familiar with ActiveX
    programming.
    As a user, however, I resent having to pay Autodesk, hundreds of dollars a
    year,
    just so I have the choice of either seeing my existing programs perform much
    worse
    with each version or having to spend weeks rewriting my 5Mb of existing code
    that
    worked fine in previous versions.

    The test program I wrote used a single command function to draw a random
    line.
    I use RRB's benchmark program to run it 1000 times. It's inexcusable that
    the
    command function should perform 6 times more slowly in a version that
    primarily
    gave us tables, fields, the sheet set manager and for ADT, improved
    detailing and
    callouts.

    ADT's memory management may be at fault. With 1Gb installed memory and only
    ADT
    running, I sometimes see all black boxes in the Vlide editor icons. This
    indicates memory
    problems. Guess its time to raise the recommended requirements to 2 Gb Ram.

    New versions of software should make us more productive each time, not waste
    weeks
    of our time/year.

    Regards,
    Doug



    my post below) I have also found that refraining from using (ENTGET) or
    (COMMAND) or (ENTMOD) and other DXF-based commands and substituting them
    with (VL-) (VLA-) or (VLAX-) ActiveX methods will more than make up for that
    processing speed. It will also extend and enhance your control of AutoCAD
    objects and allow easier access to the drawing database and external
    applications. It will also shorten your code considerably.
    compiled and I was able to convert most of it to use ActiveX functionality
    in about a week. It was well worth the time spent because everything works
    so much faster now.
    take the time to explore ActiveX in VLisp.
     
    Doug Broad, Aug 12, 2004
    #11
  12. I seriously doubt this is a memory issue.

    More likely, there are probably a lot of 'reactors' that are
    being fired as a result of what your LISP code is doing
    via (command), and they are probably consuming time
    doing whatever they're doing.
     
    Tony Tanzillo, Aug 12, 2004
    #12
  13. Hi Doug,

    I agree with your feeling about new software and how it shouldn't reduce our productivity. It's a bummer that it seems to be that way sometimes.

    However, I do believe that the leading thinkers at Autodesk have a lot of vision, based on what they've put together, maintained and developed thus far. I also believe that sometimes we have to take a few step sideways or even backwards to adjust our direction or position before we can take the steps forward.

    For example, my integration of ActiveX to replace the DXF functions took me a week to do. That was time that I had to basically stop development. But, now my application rips through it processing tasks like never before.

    I've come to accept that nothing is permanent except change and that to be an effective programmer I simply must continue to increase my knowledge, develop my methods and modify my source code respectively so that I can keep moving forward, overall.

    Looking back 20 years, even the stuff that we call "cutting-edge" today may be totally obsolete in the next decade. The way I look at it, the more I learn and apply, the longer I can postpone my retirement.
     
    Nick_Merchant, Aug 12, 2004
    #13
  14. Laurie Comerford

    Doug Broad Guest

    Hi Tony,
    Memory was just a guess. Here's the test code

    (defun test ()(command "line" (mapcar 'random '(1000 1000 1000))
    (mapcar 'random '(1000 1000 1000))
    ""))

    Random is a random number generator from Reini Urban.
    Bench is a program by RR Bell. None of the test modules
    have their own reactors. Test was run with:

    (bench '(test) nil 1000)


    I will check again tonight to turn off my vlr-reactors but I tested it with
    2005 loaded (results: 3 seconds) and then entered the "wall" command
    (which loaded perhaps 50 ADT modules) and then re-ran the test program
    and got results over 11 seconds. I erased the lines and re-ran the test
    and got 11-12 seconds again. Since my reactors didn't change between
    running with and without ADT, it might be an ADT reactor but I am
    at a loss. Why would all the Vlide toolbar icons turn black?
    In my experience, that has occured in previous versions only when I
    had numerous applications running and was maxed out on memory use.
    According to the task manager ADT 2005 uses much more RAM
    memory than ACAD 2004. My WAG is that some paging
    must be occuring.

    Regards,
    Doug
     
    Doug Broad, Aug 12, 2004
    #14
  15. Laurie Comerford

    Doug Broad Guest

    Hi Nick,
    An optimistic attitude is best. We'll get through this. ADT
    and the other verticals have improved and I have especially
    enjoyed the 3d modelling and rendering capabilities. These
    slowdowns just seem odd. I also hate fixing things that
    shouldn't have been broken in the first place. If I have to
    re-write some large applications, I'll probably use the opportunity
    to switch to either VBA or C#.

    Regards,
    Doug


    productivity. It's a bummer that it seems to be that way sometimes.
    on what they've put together, maintained and developed thus far. I also believe that
    sometimes we have to take a few step sideways or even backwards to adjust our direction or
    position before we can take the steps forward.
    do. That was time that I had to basically stop development. But, now my application rips
    through it processing tasks like never before.
    programmer I simply must continue to increase my knowledge, develop my methods and modify
    my source code respectively so that I can keep moving forward, overall.
    obsolete in the next decade. The way I look at it, the more I learn and apply, the longer
    I can postpone my retirement.
     
    Doug Broad, Aug 12, 2004
    #15
  16. Doug - You may have misunderstood me.

    I was suggesting that ADT itself has reactors
    that are firing, not the LISP apps.
     
    Tony Tanzillo, Aug 12, 2004
    #16
  17. Laurie Comerford

    Doug Broad Guest

    Thanks for the clarification.
     
    Doug Broad, Aug 12, 2004
    #17
  18. That comment on objectdcl was on the money.
    I can write progs in VB or lisp and have done large programs in each.
    I choose lisp for 90% of projects because it hooks up with Autocad so easily. VBA is just funcky for doing things. It
    does some things more easily than lisp but is just way too much work for others like changing properties of stuff
    already drawn. I know people will disagree, but I have written several things in VBA and Lisp and they both work and
    the VB/VBA method was just a big pain. The structure of VB is far superior to lisp, so you just have to learn how to
    structure lisp to fake like you have objects.

    Once you use objectdcl, the misery of dcl programming goes away and the sun comes up and birds start singing.

    If Adesk ever gets rid of lisp, its all over. They know this and should be super proud that they continue the language.
    yah, they are squeezing us for more money as time goes on, but a good politician will not insult his voters. I would
    bet 80% of tools at companies are lisp. Those that say to avoid lisp are forcing you to do extra work in many cases.

    Now, if you are doing database applications, go with VB (or C, Delphi...), not VBA or lisp. VBA does not allow reuse of
    function libraries (.bas files). It keeps them wrapped up in the dvb file. That is no way to program large stuff.
    More power to you if you know C++, I am not there though.

    I get confused when people talk about .net, I thought you had to choose vb.net. When people say vb.net, do they mean
    "using vb style calls within visual studio"? I know .net uses one runtime, but are there two editor environments, one
    for VB and one for C? Obviously the .net is newer to me and I have only read 1/2 the book by Dan Appleman on converting
    from vb6.
    thx

    Ratnakar <>
    |>As far I believe, VLISP has a DCL interface, but it is not so easy and user friendly as AutoCAD VBA. I am looking for the simillar interface that can handle VLISP functions, DCLs, actions and reactors under a single file enfvironment(e.g. *.dvb in AutoCAD VBA). DCL tiles have only one Click event. We cannot define other events. There is no tile for MTEXT. If like this, I suspect, VB will completely replace the VLISP in near future. I have seen the Object DCL also. But, it does not meet the standard of VBA. I want to know, whether the VLISP developer have already started their any actions on these issues.

    James Maeding
    Civil Engineer/Programmer
     
    James Maeding, Aug 12, 2004
    #18
  19. Laurie Comerford

    MP Guest

    VBA does not allow reuse of
    file.

    except via the method elucidated by R.R. Bell, Ed Jobe, and maybe others.

    put your function libs in a dvb,
    then reference that dvb in your vba projects the same as you'd reference any
    other dll etc

    search google for recent explanations of the method

    with classes you have to do an end run around the fact that they are not
    createable
    add a std module to the toolbox dvb with a sub for each class that creates
    the instance and passes it as a return value

    so if you have a class module Utils.cls in Toolbox.dvb
    you need to add a std module, eg: Init.bas
    in init.bas you put:
    Public Function InitUtils() as Utils
    dim oRtn as Utils
    Set oRtn = New Utils
    Set InitUtils = oRtn
    End function

    Then in your project that references Toolbox.dvb
    Sub Test()
    Dim oUtils as Utils
    Set oUtils = ToolBox.InitUtils
    ...use object
    oUtils.Method1

    Set oUtils = Nothing

    End sub
     
    MP, Aug 13, 2004
    #19
  20. Laurie Comerford

    Doug Broad Guest

    Tony,
    You are probably correct. ADT probably runs some type
    of command-ended reactor to re-layer objects according to
    a layer key. In any case, programs that use commands to
    generate geometry pay a large penalty whatever the cause.
    I ran a vlisp version of the same concept (drawing a 1000
    lines) and there was virtually no difference in performance
    with versions 2002-2005.

    2002: 0.328 sec
    ADT3.3 0.328 sec
    2004 0.407 sec
    ADT2004 0.390 sec
    2005 0.359 sec
    ADT2005 0.406 sec

    All the results are relatively close.
    ;test code
    (defun test ()
    (vla-addline
    (vla-get-modelspace
    (vla-get-activedocument
    (vlax-get-acad-object)))
    (vlax-3d-point (mapcar 'random '(1000 1000 1000)))
    (vlax-3d-point (mapcar 'random '(1000 1000 1000)))))
    (load "bench")
    (load "random-reini")

    (bench '(test) nil 1000)
     
    Doug Broad, Aug 13, 2004
    #20
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.