Reply

Propseed file

[ Edited ]

I have this macro that will link to the propseed file but I want the macro to remember at load time where it is located and have the option to seth a new path (via a FolderBrowserDialog) if the file gets moved.

What would be the simplest way, use registry keys?

 

Posted by: Yoland Gagnon
Post date: 1/10/2006 6:37:25 AM

5 REPLIES

RE: Propseed file

[ Edited ]

Yoland,

 

I usually have a Settings class with static (shared in VB.NET) methods that I can call from anywhere in my code to save settings. For example: Settings.SetPropseedPath(path as string)

 

 

Posted by: Jason Newell
Post date: 1/10/2006 8:55:12 AM

RE: Propseed file

[ Edited ]

My macro (exe) will be distributed though to 10 users, you wouldn't have an example of what you are doing (Settings class) and how you relate to it? Thanks :-)

 

Posted by: Yoland Gagnon
Post date: 1/13/2006 1:06:54 AM

RE: Propseed file

[ Edited ]

Ok I figured out how to do it using SaveSetting & GetSetting. It does what I wanted, thanks Jason

I am trying to find an example of how to retrieve data from the propseed file, do you have any example at hand?

Thanks in advance for your help.

 

 

 

Posted by: Yoland Gagnon
Post date: 1/16/2006 5:27:58 AM

RE: Propseed file

[ Edited ]

Yoland,

 

I have written a class called PropseedParser but I cannot share it as it was written for a customer.

 

I can give you hints on how to create your own though.

 

You'll need to analyze the format of the file.

 

- Notice that lines with "\\" are remarks.

- Notice that standard properties have Begin \ End blocks.

- Notice that custom properties have Begin Define Custom block and then corresponding Begin \ End blocks.

 

You can use File.OpenText() to open a StreamReader with allows you to iterate through the lines.

 

Good luck

 

Posted by: Jason Newell
Post date: 1/16/2006 5:59:36 AM

RE: Propseed file

[ Edited ]

Cool, thanks Jason, I'll start from that.

Have a nice day

 

Posted by: Yoland Gagnon
Post date: 1/16/2006 6:48:52 AM