Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need an open file interface

Status
Not open for further replies.

coondt

Programmer
Nov 12, 2002
3
AU
Hi,

I am trying to edit the Catalog Content.Mac that comes with the install. i want it to perform the task on the a catalog that I have already open, instead of having the Great outdoors catalog hard coded in.

I figure it would be very easy to do if I could use an API call used in VBA like GetOpenFilename but i cant find anything in the docuemntation.

Also, can anyone advise me how to perform the conversion, i am very new to this macro writing and the syntax is a bit of a kick in the pants.

Finally, is there a better IDE than Script Editor to use coz, right now, programming in plain black and white in a notepad-esque environment is sendng me a bit batty. I am used to Visual studio where everything goes pretty colours like comments etc

Thanks in advance

Greg
 
coondt
I agree it's not the most pleasant macro to cut your teeth on. It's difficult to give the whole answer as it's going to be specific to your own requirements, but here are some pointers:
Change ImpPath to the catalog folder e.g. "X:\Catalogs\";
Make directory = Dir$(ImpPath & "*.cat") to stop the error message coming up;
Change the arguments of g_ImpApp.OpenCatalog so that applies to your catalog(use help if you don't understand). If secure you'll need to put in the catalog Userclass & password and database UserID & password.

If you're willing to ignore the messages, this should work although I had to REM out the line:
Call TableInfo(Database.CatalogLevels(counter_1))
because it kept crashing for some reason.

The rest is up to you. I didn't like the layout as I wanted to export to a database for analysis. For this you ned to check all line starting Print #g_filenumber and tidy up references to Indent(level). The simplest way to work out what's happening is to use breakpoints and display the values of variables as things change.

I suggest look at and mark my thread thread401-404525 which is seeking input on other ways to documents catalogs etc.

Simon Rouse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top