API help, Find Method doesnt work in SolidWorks?

Feb 16, 2007 4 Replies

I am trying to use the Find Method (object.Find) to search for specified text in a SW drawing. When I try to run the command, swApp.find "mytext", I get a message stating "Object doesnt support this property or method".



Anyone know how to get this to work, or does SolidWorks API have a find function for searching notes?



What object are you applying it to?

Try using early binding so that you can see what methods are available as you type.

I'm sorry but I think we have a little mis-inturpretation of API help. Object.find is found in the vba help and is referring to Microsoft Office objects. You want to look at the SolidWorks API help which cannot be accessed from the VBA Window. In SolidWorks 'Help Menu' use SolidWorks API and Addin Help. This is all the SolidWorks Specific API Help. To do a find search in SolidWorks you have to recurse throught all the Note and Dimension objects and check all their parts for your text string. What are you trying to accomplish exactly?

I am trying to do a search on all drawinig for the word "ETCH". I may have found a solution using Windows Desktop Search to search our PDF files (it suppose to be able to search text within PDF files), but if you have any suggestions please post.

There is an API example of a Spell Checker that could be simplified to suit your needs on the SolidWorks Customer Portal under Tech Tips, Best practices and API examples .

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required