I was using a sub from codestack that looped all the entities and it worked. then i saw a macro made by a colleague used a simpler approach with the sketchbox select method.
https://help.solidworks.com/2016/englis ... elect.html
it went wrong in one case: in the isometric view nothing was selected.
my understanding (now) is that method mimic the flat (on screen) rectangle selection and it needs 2 point to draw it. FLAT on the screen.
Code: Select all
Visual Basic (Declaration)
Function SketchBoxSelect( _
ByVal FirstPtX As System.Double, _
ByVal FirstPtY As System.Double, _
ByVal FirstPtZ As System.Double, _
ByVal SecondPtX As System.Double, _
ByVal SecondPtY As System.Double, _
ByVal SecondPtZ As System.Double _
) As System.Boolean
so start and end points were like -200,-200,-200 200,200,200
to be "sure" to catch all the entities in the graphic area. looking at the result we probably drawn a selection box not flat to the screen ending up selecting nothing when in the isonetric view.
does it makes sense?
are those selection methods supposed to be flat to screen and their Z coordinates must be zero no matter what? like in the above example, but with z=0 -200,-200,0,200,200,0
should we be aware of some other "unexpected" behaviour?