News: Contact us to upgrade your software!

Author Topic: Programming HyperSizer using VBA and other questions...  (Read 25137 times)

HyperSizer Moderator

  • HyperSizer Moderator
  • Administrator
  • *****
  • Posts: 57
    • HyperSizer Structural Sizing Software
    •  
Programming HyperSizer using VBA and other questions...
« on: July 11, 2008, 12:36:25 PM »
These questions were sent in by a user...

I am currently trying to run a simple project in Hypersizer and change some of its properties via VBA. The intention is to run this code from ModelCenter to investigate such things as the effect of rib spacing on cover mass at various positions on a wing (we already have our own code to do this, so I can check whether I am getting similar answers with Hypersizer). I have found that I am having difficulty in the following.
 
1)       Defining or changing the load for an individual component (in this case, a simple stiffened panel). I guess this may be via DesignLoadsPanel and CreatePanelLoad, but am I right?

2)       Defining initial sizes for the skin thickness and stringer dimensions in a uniaxial stiffened panel component, for example. I can easily change the Buckling X and Y spans for this, so I could investigate the effect of rib spacing without problem by using a stored panel design with suitable variable ranges already set and simple resizing when I change the buckling x span. However, I would ideally like to be able to set specific values for skin and stringer dimensions and link them to an optimizer. I can read back the various skin/stringer dimensions after Hypersizer has sized the panel OK.

3)       Is there any way of getting a full or selected set of MOS values, rather than just the minimum value?

4)       I have noticed that values which I recall from the project database via programming are always in 'English' units, even though the project units are set as SI. Is there any way of changing this so that I don't have to do the rescaling myself?

5)       I have noticed that when I get the values of panel mass and area after doing a size operation, the optimized values are always panel mass/unit area and area =0.999999.... Indeed, even the total mass for a single panel was returned with the same value as mass per unit area (and all were in English units). I asked for a report in Word from the Hypersizer GUI and found that the panel mass/unit area (correctly in SI units) was consistent with values returned by my hack VBA code, but the panel area in the Word document is wrong, and so is the total panel mass. Is this a fault, or something that I doing incorrectly?

Phil

  • Administrator
  • *****
  • Posts: 218
    • HyperSizer Structural Sizing Software
    •  
Re: Programming HyperSizer using VBA and other questions...
« Reply #1 on: July 11, 2008, 12:42:52 PM »
Some quick answers:
 
1. Yes, I think you are right about how loads are assigned. 
 
2. The object model doesn't have control down to the level of individual variables.  What you can do is store several group designs and then have them swapped in and out via the object model.  So you could set up ranges of "design templates" that are applicable to different loading situations and have them automatically chosen with the object model.
 
3. No, only the lowest margin can currently be retrieved through the object model.
 
4. This is a really good point.  HyperSizer actually stores everything internally in English units.  To display in SI, the conversions are done on the fly.  Same with interfacing with an FEA.  So, the object model retrieves data directly from the database and does not have the unit conversions built in.  I will put it into our list of future enhancements.
 
5. If you are using a workspace (i.e. without importing an FEA), the area of each component is exactly 1.0 ft^2, therefore in english units, the unit weight in lb/ft^2 will always be equal to the total weight.  We don't keep track of total weight in a workspace.  I will have to check out what is going on in the Word Report.  We are making a lot of improvements to the Word reports in the new version which should be out soon.  If you are using FEA based projects, the area should be consistent with the area of a component in the FEA and the total weight should be consistent.
 
You can create batch files for a project by selecting "Generate Project Setup Batch File..." from the Options menu of the sizing form.  To use one of these batch files, select "Run Project Setup Batch File..." from the same menu.