News: Contact us to upgrade your software!

Author Topic: VBA for Excel  (Read 21135 times)

bob_o

  • Client
  • **
  • Posts: 4
    •  
VBA for Excel
« on: May 26, 2010, 04:29:28 PM »
I would like to use Visual Basic to automate the creation of some of the input to HyperSizer --  specifically the creation of 128 unique components for each of 10 different projects within a database.  All of the properties for each component would be pulled from columns of data in Excel, and that component data would reside on a separate worksheet for each project, but all within the same workbook.  The data that I want to specify is X Span, Y Span, Nx, Nxy, and normal pressure, leaving the default values for all other input.  In the particular exercise that I’m doing, there is only one group per project, that happens to be the same for all 10 projects.  So creating all of the components for each of 10 existing projects is the only part that I need to avoid having to do manually.

I know there’s much more that I could automate, and a more general Excel setup and VB code to execute trade studies would be useful in the future.  But I think I'll be able to get a lot of use out of this one specific automation, so that's all I really need for now.  (TIA)

Ryan

  • Administrator
  • *****
  • Posts: 145
    •  
Re: VBA for Excel
« Reply #1 on: June 01, 2010, 10:27:00 AM »
These spreadsheet applications are great candidates for object model automation. 

We are currently developing a generic suite of spreadsheets that perform tasks similar to to one the described above. The screenshot below shows our 'Set Component Variables' worksheet.  The left hand column specifies the component number and rows 4 and 5 specify what data to set for each component (name, Nx, span etc.).

These spreadsheets can be used as a learning tool or as a template for you own object model application. Contact HyperSizer support to request a copy of this spreadsheet.

-Ryan