A required resource was ... (not availible?) running an api program.
Aug 03, 2007 4 Replies
U
Ulf
Hello,
I've been doing some api programming. At the time I'm making a program simulating a milling curve in space. At the beginning of the program SolidWork run normal. After a while (app. after creating 25 sketches) SolidWorks slows down, and becomes even slower every time it creates more sketches. After having created 75 sketches, (it is always 75) SolidWorks send you a messagebox saying: "A required resource was " and that's it. It doesn't say what kind of problem SolidWorks have. After clicking the OK button, SolidWorks run pretty fast again. Until sometime it just exits my program without any message. I presume some sort of cache or something like it force this problem. It is not the UNDO list. I flush it without any differences.
Have someone of you had the same problem? If so, what did you do to resolve the problem. If not, do someone have an idea?
Best regards,
Ulf
Didn't find your answer? Ask the community — no account required.
F
fcsuper
I'm no pro at this, but sounds like a memory leak. It may be SolidWorks or it may be your routine. You may want to review to make sure objects are being handled correctly, as a starting point.
Matt Lorono
formatting link
formatting link
T
TOP
How are you dimming your objects?
TOP
T
That70sTick
Make sure any and all objects are set to NOTHING at the end of your program before it closes. This includes all document objects, feature opjects, application ("swApp"), etc.
U
Ulf
Hi,
first of all I want to mention that I write my programs in C#. I do not allocate any memory other than my local variables which are only "doubles" and only 18 of them. Below you will see my code: