SERIOUS problem with ENTNEXT

A very serious problem exists with ENTNEXT.

Try the following:

Start BricsCAD with an empty drawing. Before doing anything else switch to Layout1. BricsCAD automatically creates a viewport entity there. Switch back to Model. Draw a circle. Enter (setq en (entlast)) - you can test that the last entity is stored in en with (entget en).

Now type (entget (entnext en)). Since en is the last entity in the drawing base, (entnext en) should return nil. However: in BricsCAD (entnext en) returns the viewport entity.

Even worse: when you have created other objects in paperspace of Layout1, then (entget (setq en (entnext en))) would return all of these layout-objects despite the fact that they have been drawn BEFOR the circle.

 

Comments

  • Dear Thomas,

    yes, unfortunately, this is a known problem :-(
    The only chance currently, to get around this problem, is to also check the 410 dxf group cde and compare with current layout;
    when using (ssget), the filter list should also contain (list 410 (getvar "CTAB")) to prevent selecting entities from other layouts.

    But even Acad has a very strange problem here - unfortunately, that (similar) issue comes very rarely, but as verified with other developers, some mysterious problems are caused by that similar issue in Acad as well.

    We are currently working on this problem, to provide a more reliable (entnext) / sds_entnext() here.

    Sorry for these bad news :-(

  • Hi Torsten,

    nice to meet you here :-)

    In my app I have hundrets of (while (setq en (entnext en)) ...) and similiar constructions. And worse: some need to collect ALL entities in ALL layouts, others only need to collect the recently created entities. I started to do filtering for the 410 code, but I am afraid that this will remain a cause for bugs and weird behaviour in my apps for quite some time ...

    Is there a list of serious bugs like that with ENTNEXT?

    Cheers
    Tom

This discussion has been closed.