LINKING SE2D with MS ACCESS

N/A

OK,
I've found out how to link MS Access with SolidEdge 2D.
Secret is to export an individual record to a XLS spreadsheet.
You can do this via a Macro which can be on the front of a form.
Here's the VBA (at least the two relevent lines of it):

RunCommand acCmdSelectRecord
DoCmd.OutputTo acForm, "fulldetails", "MicrosoftExcelBiff8(*.xls)", "C:\se2d\drawings\outfile.xls",
False, "", 0

That should all be on two lines one starting "RunCommand" and one starting "DoCMD".

Change "C:\se2d\drawings\outfile.xls" to the path you want the record to be saved
at, and then link your drawing to that Excel file same as you would if it was linked
to an excel file.
Just make a control button in a form and link to a macro, once it's positioned RMB,
Properties and select the "..." by the side of "OnClick". This takes you to the
VBA window, insert these two lines between the "header" and "footer" of the macro
code (taking out any uneccessary code), and it "should" work.
The first line just selects the actual record associated with the one currently
displayed on your screen in Access, the second command saves the selected as a XLS
file in a given location.
You can add other bits and gubbins in there: check the "outfile" doesn't already
exist, rename a .DFT file to the customer record, etc. then all you have to do is
open the drawing file in SE2D and update the links, then print.
Until now I'd been using Excel as a second-rate database (like many engineers!)
so I thought it was time I linked SE2D to a proper database file.
Is this useful?
Is this posting ethical for this forum?
Thoughts and comments welcome.
If you need more info on this, let me know.
-Andy.
www.continual-motion.com
1 REPLY

Re: LINKING SE2D with MS ACCESS

N/A
Andy,
Posting this type of info is good. We want users of 2D Drafting to teach and
share information about the software. I urge others to help answer
questions.
Everyone keep up the good work.
Regards,
Rick B.