Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Help Me

Status
Not open for further replies.

aamoroso

Mechanical
Mar 5, 2003
432
I am working on the never ending rebuild all configs macro. I have been able to get the macro to force rebuilding of all configs and export the Config names and a true or false value to a file on my desktop. I am still having one problem:

swModel.ForceRebuild3

I have noticed that when I force rebuild of all configs, the macro only returns a false value for a configuration if there is an error in an actual feature, but it doesnt return a false value if there is an error in the sketch of of feature. Is it possible to return values based on Sketch errors, I cannot find anything in the help files regarding sketch errors.
 
Replies continue below

Recommended for you

Nevermind, I think it is working correctly. Perhaps someone will help explain this to me though. I opened a file that was not yet converted to 04 (I get the little message the file will be converted when saved). Well after running my macro, it rebuilds all configs (about 20) and then returns my results in a Text file on my desktop. The results were coming back True for all but one config. When I go to the model and change through the configs manually I was getting errors on a bunch of them due to an overdefined sketch. I deleted the overdefining dimensions - left the sketch under defined - re-ran the macro - same results (of course). I then closed the model but I didn't save it, when I opened the model back up I still get the file will be converted when saved message. I am expecting to find errors again just like every other time but now there are now errors, I didn't save the file, the sketch is full defined with no errors and I cannot reproduce the results I was getting the entire time I have been working on this macro. I am thinking perhaps my macro is behaving fine and that there really weren't errors to begin with, could Solidworks have been falsely showing errors in the FM, and if so why not now, the saved date on the file is still a 2003 date.
 
It's Murphy playing his tricks ...
It's Windows ...
It's Monday & the wind is from the East ...
It's Dalton McGuinty telling the truth ... Yeah ... right!!!

[cheers] from (the City of) Barrie, Ontario.

[smile] Support bacteria - they're the only culture some people have [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor