VBA Intersectwith x64 : Problem with 18.1.05-1 but not in 17.2.12-2

I took my x64 code from 17.2.12-2 to 18.1.05-1 but I've some problems about the intersectwith function.

My DWG file has about 80000 objects (mainly polylines and blocks in 2D)

I can't publish all my codes but here's the problem :

In 17.2.12-2, this code works great :

Index = acLine.IntersectWith(acCurrentEntityBox, acExtendNone)
indexBox = acLine.IntersectWith(acPolylineBox, acExtendNone)

In 18.1.05-1, I need to add DoEvents to work correctly :

Index = acLine.IntersectWith(acCurrentEntityBox, acExtendNone)
DoEvents
indexBox = acLine.IntersectWith(acPolylineBox, acExtendNone)
DoEvents

The problem is that the DoEvents function decreases badly the execution speed.

What's the problem ?

Kr,

Comments

  • Is it possible that your VBA code still references V17 or x86 typelibs ?
    Can you run BricsCAD with admin rughts ("run as admin") ?

    If you regulary switch between V17 and V18 (and/or between x86 and x64 versions), you will need to run any bricscad.exe with admin rights, to ensure that the COM interfaces are properly re-registered during startup-

    So far, nothing as changed at BricsCAD's COM interfacem which would explicitly require "DoEvents" calls ...
    hope this helps a bit ?

    many greetings !

  • I think it is best to make a small sample application, and a small sample dwg. and open a support request ... then we can try to reproduce the problem, why "DoEvents" now seems necessary (should not, of course).

    As more simple the sample is, as better & easier for our analysts to reproduce.
    many greetings !

  • Karma_Level_4
    edited November 2017

    Ok, I'll try to extract module and a simple DWG.

  • Well it's not easy to extract modules but i succeded.

    Results with 17.2.12-2 :

    -> BricsCAD 20.1 BricsCAD
    ----> DoEvents Not Activated
    Found [METRE] [MIR BOX] EF19 (EF19):37
    Found [METRE] [MIR BOX] EF18 (EF18):3955
    Found [METRE] [MIR BOX] EF17 (EF17):3960
    ----> DoEvents Activated
    Found [METRE] [MIR BOX] EF19 (EF19):37
    Found [METRE] [MIR BOX] EF18 (EF18):3955
    Found [METRE] [MIR BOX] EF17 (EF17):3960

    Results with 18.1.05-1 :

    -> BricsCAD 21.0 BricsCAD
    ----> DoEvents Not Activated
    Found [METRE] [MIR BOX] EF19 (EF19):37
    Found [METRE] [MIR BOX] EF18 (EF18):3955
    NOT FOUND [METRE] [MIR BOX] EF17 (EF17):3960
    ----> DoEvents Activated
    Found [METRE] [MIR BOX] EF19 (EF19):37
    Found [METRE] [MIR BOX] EF18 (EF18):3955
    Found [METRE] [MIR BOX] EF17 (EF17):3960

    Attached 1 ZIP File with :

    test 18.1.05-1 x64.dwg
    BricsCAD_Test_IntersectWith.dvb

    To start the test : Call Main

    That works only in 18.1.05-1, if I add (check in the code) : If (bDoEvents = True) Then DoEvents

    Kind Regards

  • Same issues in 18.1.06-1

  • Can anybody check if the problem is only with my configuration ?

  • I get the same output in the 'Immediate' window.
    V18.1.06 (reinstalled + Run as Administrator).

  • @Roy Klein Gebbinck said:
    I get the same output in the 'Immediate' window.
    V18.1.06 (reinstalled + Run as Administrator).

    Thanks Roy, I'm not the only one ;-)

  • Same issues in 18.1.08-1

  • Dear sir,
    this is the user forum, for communication with peer users.
    If your intention is to report a problem to the Bricsys development team, please file a support request.
    Best regards.

  • @Hans De Backer said:
    Dear sir,
    this is the user forum, for communication with peer users.
    If your intention is to report a problem to the Bricsys development team, please file a support request.
    Best regards.

    Understood

  • Finally, problem solved with version 18.2.08-1

  • I also found new releases of Bricscad Win and Shape today.
    It is so satisfying to see all those little improvements and care
    about details.
    And Bricsys Release Notes are the funniest I ever read :)

This discussion has been closed.