Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Talking Programming Approach for Pattern Layouts

    Greetings friends, I'm a bit new here so if I end up posting in the wrong area I apologize in advance.

    Odd question,
    I am a pattern designer utilizing Access to organize a clothing and accessory design system. It essentially uses taken measures from a person and does a block analysis of how their pattern should be laid out, and then does a structuring using the vba/adobe illustrator library according toa formulaic substructure. At this point in the game the table structure is well assembled, and the interface is coming along swimmingly.

    However, looking at how my calculation entry I realized that my programming is over elaborate, hard to correct for and the addition of new block sets is incredibly daunting. I'd like to be able to simplify the process so that someone other than me can do the blocking procedures.

    The process boils down to

    Measurement Organization
    Point Calculation (x,y) format <---- Insert dillema here
    Schema grouping of points for parser
    Parser eats the points, lays out the pattern(s) into a graphic layout
    Archiving of finished pattern set



    After some time I've managed to break down the other four categories into a digestable series of steps. The calculation step is the difficult one

    My approaches to this problem are as follows (including pros and cons)

    1. VBA calculation sets and commital of arrays
    PROS: Reliable, looks nice as an accomplishment
    CONS: Not many people who would be using this system would be capable of programming

    2. Excel templates
    PROS: Easy to make out and look pretty for the not so tech savvy. Easy to format so users can insert their own block equations, easier to expedite
    CONS: System would be based on import and export of data to and from excel and access. Create a template, populate with custom metrics, import the results, kill the file.

    3. Table Math (friends recommendation)
    PROS: The calculation data would be on board as queries, customizations could be made within a query def.
    CONS: A query yields a maximum of 18 entries with access(as far as I know), where my blocks run 40 to 200 calculations, each with a X and Y entry, yielding 80 to 400 depending on the block. Would require multiple queries

    Right now Im looking at the excel template idea. Its not so much what Im programming but how. If anyone has any ideas on the subject please let me know

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Can you re-explain this and perhaps simplify the explanation? It's a bit confusing for someone who isn't involved with your project itself.

    In general though, how I like to set things up with an application is:

    1. I utilize functions in modules. For example, I'll have a module called: 'General Return Functions' which will consist of functions that return data... ie.

    Function retCustomerName(CustID as variant) as variant
    dim rs as adodb.recordset
    set rs = new adodb.recordset
    dim strSQL as string
    strSQL = "Select * from tblCustomers where CustomerID = " & CustID & ""
    rs.open strSQL, currentproject.connection, adopenkeyset, adlockreadonly
    retCustomerName = rs!CustomerName
    rs.close
    set rs = nothing
    End Function

    Then wherever I want to return the customer's name (including as an expression in a query), I can simply call this function, passing it the CustomerID (my autonumber value). For example, I may have an unbound form (ie. not bound to any table), and I want to open this form and populate an unbound text field labeled CustName with the customer name. After I open this form, I'll have code as such (say I'm opening this form from my customer form)...
    Docmd.Openform "frmCustomerSurveys"
    Forms!frmCustomerSurveys!CustName = retCustomerName(me!CustomerID)
    or
    If the form is bound to a recordset (ie. my customer table), I'll just put the function itself into the ControlSource of a field. ie.
    =retCustomerName([CustomerID])

    I will usually organize my modules based upon what kind of functions they contain. But I found that writing functions within modules to carry the workload is a nice, easy way to develop an application and makes things easy to follow and make changes. They also make it easy if for example, I'm developing another application with a similar table structure and I can then just copy the module which has all the functions I need from a previous development.

    You may also want to look at the code repository. There are some nice examples there. By looking at how other developers organize things, you can pick up some good ideas on how you want to go about it. There are some techniques you can pick up which will save you a lot of thinking about how you want to do them. For example, the GetUser post shows you how to easily return the user's loginID in a simple function so you don't need to design a login type of form. There's a few search type examples where you can get some ideas on how you want to search for your records., etc...ect...

  3. #3
    Join Date
    Oct 2010
    Posts
    2

    Talking

    Dont I know it, explaining this is like pulling teeth. Essentially a block is a series of formulas relating to a persons body measurements. These formula sets used to make the block are called plates. Plates are xy coordinate guidelines of clothing types (jacket, overcoat, pants etc etc.) that are used on many different people.

    What Im trying to do is introduce an easy way for my designers to enter their own equations to create their own plate sets. These people are not typically code smart so vba module entry would limit my user base. Heres how it would go.
    1. Take measurements from a person and store.
    2. Pass measurements through a plate, creating xy coordinates
    3. Pass measurements through a Schema reader for groupings and alterations
    4. Plot the xy coordinate sets using adobe illustrator / vba (think data driven graphic illustration)
    5. Archive the result
    That plate is the problem child. I need to be able to give my user a way to fabricate their own set of unprocessed equations, and then insert that plate into the database for processing versus a set of measures. Its basically a way of making a tool to use another tool.

    Thank you for the module commentary though my friend, but believe me my module sets are well organized for general use. These plates however are so specific in programming...Im just not sure HOW I should proceed. If this doesnt make more sense Imma draw a diagram and insert it here later. Whats the file size limit for it just so I know?

  4. #4
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    I will admit I'm still a little confused how the 'plates' work, but just to clarify the question: Are you asking for advice on how to allow your users to create/edit the 'plates' or for a way to load plates into the system for your users to incorporate into their designs? Also, how are the calculations for the plates generated, authored, captured, etc...?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. 2 programming issues
    By gripper in forum Programming
    Replies: 3
    Last Post: 10-06-2010, 11:10 AM
  2. Help Please - Programming Labels
    By graviz in forum Programming
    Replies: 4
    Last Post: 03-02-2010, 10:37 PM
  3. VB Programming
    By mstefansen in forum Programming
    Replies: 4
    Last Post: 08-31-2009, 07:15 AM
  4. Best approach to export to HTML in this scenario
    By techguy817 in forum Import/Export Data
    Replies: 0
    Last Post: 04-17-2009, 10:28 PM
  5. New to Access programming
    By pushpm in forum Programming
    Replies: 1
    Last Post: 02-20-2009, 03:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums