API WTF

The API continues to astonish me with its bizarre behavior.

Make a simple macro:

Dim swApp As Object Dim filters As Variant

Sub main() Set swApp = Application.SldWorks filters = swApp.GetSelectionFilters End Sub

I run this macro having opened a part and enabled the 'Vertices' filter. The VARIANT 'filters' returned contains *3* elements. One is the expected selection type ID for vertices (3), while the other two values (92, 110) don't event map to anything in the swconst.tlb (or swconst.h for that matter). Add the edges filter and you get 1 as expected, along with 46 and 108. Go one step further and filter faces and 2 is added to the array, along with 109.

1 46 108

2 109

Perhaps I've missed something, but just how is this API call supposed to work?

Reply to
Jim Sculley
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.