Startup file

First written by ditaha and 0 others, on Thu, 2004/08/12 - 12:20pm, and has been viewed by 46 unique users

Dear friends and colleagues

I just have a short question, and I hope one of you can answer me.
How do I change the startup file in ArcMap 8.2? I just need to set
some variables at the beginning of the application...there was this
startup settings we used to make with ArcView 3.x...does anyone know
how this is done with ArcMap 8.2???

thanx in advance

Dina Taha

atalaat

Dear Dina,

One simple way to do so is to declare your variable in the general declaration area of ThisDocument of the Normal.mxt. This will apply to all ArcMap sessions on the same computer. To do so:

- In ArcMap: Tools -> Macros -> Visual Basic Editor
- In the VB Editor: Open the Normal.mxt -> ArcMap Objects -> ThisDocument
- Here you can declare your Variable (as a Public Variable, I guess) in the general declaration area. Set an initial value for this variable either under the OpenDocument event or the NewDocument, or both, according to when do you want to set and use your variable. Please check the On-Line help for more information on both and other document events.
- This is all, you don't need to save these changes because they are automatically saved in your Normal.mxt file. the next time you open ArcMap you will have your variable declared.
- If you want your variable to be declared and used in a certain document only, and not in all ArcMap documents, put the whole stuff under the Project's ThisDocument module and not under Normal.mxt. Then you have to save the current ArcMap document under a certain name and use this specific document every time you need to use this variable.

Again, please check the On-Line help of ArcObjects for more information about the difference between Normal.mxt and the current document.

The code below is an example on how your code should appear in ThisDocument:

'''*******************
Public g_strVariable As String

Private Function MxDocument_NewDocument() As Boolean
g_strVariable = "Welcome to ArcMap"
MsgBox g_strVariable
End Function
'''*******************

I Hope this helps.

Salaam,

Ahmed Talaat
GISCON Geoinformatik
Hanover, Germany.
www.giscon.de

----- Original Message -----
From: Dina Sameh Taha
To: [email protected]
Sent: Thursday, August 12, 2004 11:20 AM
Subject: [GIS-Cafe] Startup file

Dear friends and colleagues

I just have a short question, and I hope one of you can answer me.
How do I change the startup file in ArcMap 8.2? I just need to set
some variables at the beginning of the application...there was this
startup settings we used to make with ArcView 3.x...does anyone know
how this is done with ArcMap 8.2???

thanx in advance

Dina Taha

Mideastern Cafe for GISers. Relax, discuss, and benefit!
http://groups.yahoo.com/group/gis-cafe

Yahoo! Groups Sponsor
ADVERTISEMENT

------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/gis-cafe/

b.. To unsubscribe from this group, send an email to:
[email protected]

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]

Thu, 2004/08/12 - 1:08pm Permalink
ditaha

Dear friends and colleagues

I just have a short question, and I hope one of you can answer me.
How do I change the startup file in ArcMap 8.2? I just need to set
some variables at the beginning of the application...there was this
startup settings we used to make with ArcView 3.x...does anyone know
how this is done with ArcMap 8.2???

thanx in advance

Dina Taha

Thu, 2004/08/12 - 12:20pm Permalink
atalaat

Dear Dina,

One simple way to do so is to declare your variable in the general declaration area of ThisDocument of the Normal.mxt. This will apply to all ArcMap sessions on the same computer. To do so:

- In ArcMap: Tools -> Macros -> Visual Basic Editor
- In the VB Editor: Open the Normal.mxt -> ArcMap Objects -> ThisDocument
- Here you can declare your Variable (as a Public Variable, I guess) in the general declaration area. Set an initial value for this variable either under the OpenDocument event or the NewDocument, or both, according to when do you want to set and use your variable. Please check the On-Line help for more information on both and other document events.
- This is all, you don't need to save these changes because they are automatically saved in your Normal.mxt file. the next time you open ArcMap you will have your variable declared.
- If you want your variable to be declared and used in a certain document only, and not in all ArcMap documents, put the whole stuff under the Project's ThisDocument module and not under Normal.mxt. Then you have to save the current ArcMap document under a certain name and use this specific document every time you need to use this variable.

Again, please check the On-Line help of ArcObjects for more information about the difference between Normal.mxt and the current document.

The code below is an example on how your code should appear in ThisDocument:

'''*******************
Public g_strVariable As String

Private Function MxDocument_NewDocument() As Boolean
g_strVariable = "Welcome to ArcMap"
MsgBox g_strVariable
End Function
'''*******************

I Hope this helps.

Salaam,

Ahmed Talaat
GISCON Geoinformatik
Hanover, Germany.
www.giscon.de

----- Original Message -----
From: Dina Sameh Taha
To: [email protected]
Sent: Thursday, August 12, 2004 11:20 AM
Subject: [GIS-Cafe] Startup file

Dear friends and colleagues

I just have a short question, and I hope one of you can answer me.
How do I change the startup file in ArcMap 8.2? I just need to set
some variables at the beginning of the application...there was this
startup settings we used to make with ArcView 3.x...does anyone know
how this is done with ArcMap 8.2???

thanx in advance

Dina Taha

Mideastern Cafe for GISers. Relax, discuss, and benefit!
http://groups.yahoo.com/group/gis-cafe

Yahoo! Groups Sponsor
ADVERTISEMENT

------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/gis-cafe/

b.. To unsubscribe from this group, send an email to:
[email protected]

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]

Thu, 2004/08/12 - 1:08pm Permalink