DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Strange values for Select

Started by Dempsey, August 26, 2008, 08:59:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dempsey

Assume a drawing with two boxes and a dimension and then I run this macro:


for Ent = 1 to sys(9)
  entity Ent
  getattr Ent, Type, Select, Laynum, Group, Red, Green, Blue, Solid
  print Ent, Type, Select, sys(96)
next Ent
end


With one box selected the Select values are fine, 0 and 1

With two boxes selected the Select value for the second box is 3.

When I then unselect everything the two boxes have a Select value of 2.

In all three situations the Select value for the dimension is 0.

I get the same strange results with other drawings and selecting a few solids.

And I get the same strange results  in V17.2, V18.2 and V18.3-beta.

What am I doing wrong?
Dempsey

bdeck

Hello Dempsey,

Once again you have found an interesting behavior in DC.

It appears that the previous selection flag of 2 is ORed with the current selection flag 1.

So if a currently selected entity was also part of the prior selection it will have a select value of 3.

I was not aware of this feature.

Looks like the correct way to test the value of select is with "AND" logic.

BD

Dempsey

Thanks for looking at it bdeck. I was afraid I was losing it. Your explanation makes sense, but I am wondering if this a "feature" or a "bug". If it is a feature then the documentation (e.g. macros17.hlp) need to be updated.
Dempsey