Software Use > Scripting

Error on HyperSizer.Application.CloseDatabase

(1/1)

clayton_little:
I have a VBA script that runs HyperSizer thousands of times. After 20,000 or so calculations, the database grows too large, and no more calculations can be performed. I can fix this by manually compacting the database, however I'd like to do this using the API if possible. I'm running into problems closing the database, though.

I am guessing that in order to compact the database I have open, I must first close it. When I make the call:


--- Code: ---HyperSizer.Application.CloseDatabase
--- End code ---

...I get an unhandled error that reads:

"Run-time error '-2147188733 (80048003)' Unhandled Error, Application Error in Application::CloseDatabase[Function]() Line #17, Error #-2147188737, Error returning HyperSizer license"

I am using version 5.8.11 of HyperSizer. Any sage advice on how to get around this?

Ryan:
It looks like both the CloseDatabase and CompactDatabse methods are broken. I have submitted support tickets to fix these bugs.

As a workaround for CloseDatabase you can set the application object to nothing.

--- Code: ---Set hsApplication = Nothing
--- End code ---

Unfortunately, I do not have a workaround for CompactDatabase. It looks like that needs to be done manually. I guess the only option is break the analysis into chunks, pause the analysis at certain intervals, and manually compact the database.

What is the approximate size of your analysis? How many components, candidates per component, load cases, and iterations with FEA?

clayton_little:
In this case, I'm running a workspace (no FEM) with 1 user defined load case on a single (panel) component. There are ~1,000 candidate designs. For each calculation, I modify the loads, save the component, and re-run.

With the workaround for closing the database, I suppose another option would be making several copies of my compacted database on my file system, and then swapping them out as I run out of space. I'll give that a whirl on Monday...

Ryan:
This bug has been fixed in the latest development version. The fix will be publicly available in the next release (6.2).

Navigation

[0] Message Index

Go to full version