Delphi COM Programming - large selection set

Hi!
I'm porting VBA app to Delphi. Main task of program is to extract specific attribute from specific block . VBA solve this task in second (about 9000 blocks in drawing), but Delphi needs about 40 seconds for same task. In delphi I'm using selection with filters so my selection set contains only blocks of interest. In delphi, if task is only to read block handle and add it to list it needs about 15 sec, but if task is to read handle and specific attribute then time is about 40sec. Is this limitation o COM programming or am I doing something wrong. Any idea how to bypass this problem. Thanks in advance!

Comments

  • I believe that VBA and LISP are native to Autocad and Bricscad, so they have an inside processing advantage. I use the Lazarus FreePascal compiler, and it is not as fast as Bricsys LISP. I don't use VBA. The COM by Lazarus is OK for single command routines, but if I need to process a sizable list of commands I build a LISP function and call it by the Lazarus COM. It is the same for Autocad. For dynamic use I save a List File of commands, and the LISP function loads that file and executes them. The benefit of using a COM, instead of using the LISP directly, is that you have built a visual environment that is more friendly than a command line or strict GUI.

    Rick

  • Adding to the above... I forgot to mention that BricsCAD LISP is much faster than AutoCAD LISP. My COM unit was faster than AutoCAD LISP... not so with BrycsCAD.

    Rick

  • Thanks Rick for Your comment. Finally somebody who uses delphi and BricsCad.
    Yes, by generating a list in LISP and importing it in Delphi, the problem was solved at an amazing speed. And yes, BricsCad LISP is really fast!

  • Very good. Glad that I could point you in a good direction.

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!