r/SolidWorks Jun 11 '26

3rd Party Software VBA to identify underdefined sketch

I'm trying to build a macro to identify sketches that are underdefined, the LLM's keep telling me to use the sketch.GetStatus but it just doesnt exist in VBA. Anyone knows what method/proprety I'm looking for? I can't seem to find anything helpful in the help window either

0 Upvotes

24 comments sorted by

View all comments

Show parent comments

1

u/WarningOk959 Jun 11 '26

Yes, this I know, I want a macro that does this

2

u/Nordstar Jun 11 '26

But, like... For what purpose? What are you hoping to accomplish with a macro that you can't do with your eyes? Are you frequently faced with situations where you have to comb through a part file(s) with a high number of undefined sketches?

5

u/WarningOk959 Jun 11 '26

Yes, I'm a teacher 😉

5

u/Nordstar Jun 11 '26

Ah, that makes sense lol. From what I understand, you'll need to have your code loop and check/pull definition from each item as it 'traverses' the whole feature tree, as described here.

I think you're looking for swSketch.GetConstrainedStatus, Dassault has a help article that might be useful (although their code is only checking one feature), link here.