Invert Selection [VBA] [V8i]

Good morning,

I would like to select the unselected elements and, vice versa, deselect the selected ones.

Is it possible, and, if yes, how?

Thanks a lot,

Paolo

Parents Reply Children
  • Using the 'Selector' tool, you can use 'Invert' (4th icon in the bottom row) and place a fence - this will select the unselected elements, and de-select the selected ones. Is that what you are looking to do?

    I recorded a simple example - selected some items in a fence, did 'Invert' and placed a fence to invert the elements. The code is shown below.

    SetCExpressionValue "powerSelectInfo.prefs.currMode", 0, "PSELECT"

    CadInputQueue.SendCommand "POWERSELECTOR MODE NEW"

    point.X = startPoint.X + 26.8213001950855
    point.Y = startPoint.Y + 24.6794164464499
    point.Z = startPoint.Z
    CadInputQueue.SendDataPoint point, 1

    point.X = startPoint.X + 39.9777199590256
    point.Y = startPoint.Y + 15.6472588809966
    point.Z = startPoint.Z
    CadInputQueue.SendDataPoint point, 1

    SetCExpressionValue "powerSelectInfo.prefs.currMode", 3, "PSELECT"

    CadInputQueue.SendCommand "POWERSELECTOR MODE INVERSE"

    point.X = startPoint.X - 1.84316991861962
    point.Y = startPoint.Y + 1.84459555914188
    point.Z = startPoint.Z
    CadInputQueue.SendDataPoint point, 1

    point.X = startPoint.X + 40.0412775424263
    point.Y = startPoint.Y + 28.305000821315
    point.Z = startPoint.Z
    CadInputQueue.SendDataPoint point, 1