#31 Tue 18 May 2010 10:37
- mlking31
- Participant occasionnel
- Date d'inscription: 17 Dec 2008
- Messages: 36
Re: [MapBasic] automatisation échelle graphique
oui je veux bien mais je sais pas comment calculer l'échelle je veux quelle soi la même avec juste les chiffres qui changent je sais pas si tu vois ce que je veux faire.
J'ai essayer de créer un WOR mais les chiffres ne changent pas il créer seulement du texte 0 après 2 et ensuite 4 (j'ai utiliser l'outil layscale )et il les mets au dessus de la barre d'échelle!
Hors ligne
#32 Tue 18 May 2010 11:21
- Spacejo
- Membre
- Lieu: Nancy
- Date d'inscription: 17 Aug 2008
- Messages: 2511
Re: [MapBasic] automatisation échelle graphique
Peux tu nous poster un .wor qui te donne satisfaction?
Hors ligne
#33 Tue 18 May 2010 11:31
- mlking31
- Participant occasionnel
- Date d'inscription: 17 Dec 2008
- Messages: 36
Re: [MapBasic] automatisation échelle graphique
Code:
!Workspace
!Version 700
!Charset WindowsLatin1
Open Table "C:\Documents and Settings\stagiaire.sca\Bureau\centrer_carte\communes dep13" As communes_dep13 Interactive
Open Table "C:\Documents and Settings\stagiaire.sca\Bureau\pgm map basic\tache_desagregee" As tache_desagregee Interactive
Open Table "C:\Documents and Settings\stagiaire.sca\Bureau\pgm map basic\mittage" As mittage Interactive
Select * from communes_dep13 where ID = 1 into resultat_select noselect
Set Window MapBasic
Position (0.572917,7.11458) Units "in"
Width 11.5521 Units "in" Height 1.63542 Units "in"
Open Window MapBasic
Browse * From resultat_select
Position (0.927083,1.30208) Units "in"
Width 6.625 Units "in" Height 4.47917 Units "in"
Set Window FrontWindow() Printer
Name "PDFCreator09" Orientation Portrait Copies 1
Papersize 9
Map From resultat_select,mittage,tache_desagregee,communes_dep13
Position (0.0520833,0.0520833) Units "in"
Width 11.3854 Units "in" Height 4.47917 Units "in"
Set Window FrontWindow() ScrollBars Off Autoscroll On
Set Map
CoordSys Earth Projection 3, 1002, "m", 0, 46.8, 45.898918964419, 47.696014502038, 600000, 2200000
Center (847035.4456,1841760.967)
Zoom 28.85358177 Units "km"
Preserve Zoom Display Zoom
Distance Units "km" Area Units "sq km" XY Units "m"
Set Map
Layer 1
Display Global
Global Pen (2,2,16711680) Brush (1,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Label Line None Position Center Font ("Arial",0,9,0) Pen (1,2,0)
With COMMUNE
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 2
Display Global
Global Pen (1,2,0) Brush (2,16750640,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Label Line None Position Center Font ("Arial",0,9,0) Pen (1,2,0)
With Hauteur
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 3
Display Global
Global Pen (1,2,0) Brush (2,12632256,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Label Line None Position Center Font ("Arial",0,9,0) Pen (1,2,0)
With Hauteur
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 4
Display Graphic
Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Label Line None Position Center Font ("Arial",0,9,0) Pen (1,2,0)
With COMMUNE
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Set Window FrontWindow() Printer
Name "PDFCreator09" Orientation Portrait Copies 1
Papersize 9
Layout
Position (0.708333,0.989583) Units "in"
Width 6.625 Units "in" Height 4.47917 Units "in"
Dim uniqueStringName As String
uniqueStringName = "Set " + SessionInfo(1)
Set CoordSys Layout Units "in"
Create Frame (0.1722,0.1396) (11.5597,8.1444)
Pen (1,2,0)
Brush (2,16777215,16777215)
Title "resultat_select,...,communes_dep13 Carte"
FillFrame On
Create Rect (9.6806,6.5181) (11.6944,8.2632)
Pen (1,2,0)
Brush (2,16777215,16777215)
Create Region 1
18
(10.6208,7.6132)
(10.6208,7.6132)
(10.6208,7.6132)
(10.6208,7.6306)
(10.6583,7.6306)
(10.6583,7.5653)
(10.7063,7.6306)
(10.7215,7.6306)
(10.7215,7.4007)
(10.7396,7.4007)
(10.7063,7.3681)
(10.6722,7.4007)
(10.6882,7.4007)
(10.6882,7.5326)
(10.6389,7.4833)
(10.6208,7.4833)
(10.6208,7.6132)
(10.6208,7.6132)
Pen (1,2,0)
Brush (2,8421504,16777215)
Center (10.6208,7.6132)
Create Text
"0"
(9.8722,7.6951) (9.9424,7.8569)
Font ("Times New Roman",1,10,0)
Create Region 1
5
(9.9049,7.8924)
(10.6944,7.8924)
(10.6944,7.9313)
(9.9049,7.9313)
(9.9049,7.8924)
Pen (1,2,0)
Brush (2,0,0)
Center (10.2993,7.9118)
Create Region 1
5
(9.9049,7.9313)
(10.6944,7.9313)
(10.6944,7.9708)
(9.9049,7.9708)
(9.9049,7.9313)
Pen (1,2,0)
Brush (2,16777215,16777215)
Center (10.2993,7.9507)
Create Text
"2"
(10.6549,7.6951) (10.725,7.8569)
Font ("Times New Roman",1,10,0)
Create Region 1
5
(10.6944,7.8924)
(11.484,7.8924)
(11.484,7.9313)
(10.6944,7.9313)
(10.6944,7.8924)
Pen (1,2,0)
Brush (2,16777215,16777215)
Center (11.0889,7.9118)
Create Region 1
5
(10.6944,7.9313)
(11.484,7.9313)
(11.484,7.9708)
(10.6944,7.9708)
(10.6944,7.9313)
Pen (1,2,0)
Brush (2,0,0)
Center (11.0889,7.9507)
Create Text
"4"
(11.4444,7.6951) (11.5146,7.8569)
Font ("Times New Roman",1,10,0)
Create Text
"Kilomètres"
(10.4132,8.0056) (11.0646,8.1674)
Font ("Times New Roman",1,10,0)
Create Rect (9.8896,6.6972) (10.3812,6.9278)
Pen (1,2,0)
Brush (2,12632256,16777215)
Create Rect (9.8819,7.0701) (10.3736,7.3007)
Pen (1,2,0)
Brush (2,16750640,16777215)
Create Text
"Tache urbaine"
(10.4632,6.7271) (11.4431,6.9035)
Font ("Arial",0,11,0)
Create Text
"Mittage"
(10.4632,7.0924) (10.9646,7.2688)
Font ("Arial",0,11,0)
Create Text
"Tache urbaine et mittage dans la commune d'Aix en Provence"
(1.3701,0.1819) (10.5451,0.5653)
Font ("Arial",0,24,0,16777215)
Set Layout Ruler On Pagebreaks On Frame Contents Active
Zoom 69.8338 Center (4.42271,2.92313) Extents To Fit
Set Window FrontWindow() Autoscroll On
Run Command uniqueStringName
Undim uniqueStringName
Set Window FrontWindow() Printer
Name "PDFCreator09" Orientation Landscape Copies 1
Papersize 9
Dim WorkspaceMaximizedWindow As Integer
WorkspaceMaximizedWindow = Frontwindow()
Set Window WorkspaceMaximizedWindow Max
Undim WorkspaceMaximizedWindowvoila quelque chose dans ce genre la me convient bien
Hors ligne
#34 Tue 18 May 2010 11:49
- Spacejo
- Membre
- Lieu: Nancy
- Date d'inscription: 17 Aug 2008
- Messages: 2511
Re: [MapBasic] automatisation échelle graphique
Et ce .wor te sort ta carte avec l'échelle comme tu le désires, il n'y a rien à retoucher?
Ce que tu cherches maintenant c'est de faire ceci en batch (par lots).
Dernière modification par Spacejo (Tue 18 May 2010 12:01)
Hors ligne
#35 Tue 18 May 2010 11:54
- mlking31
- Participant occasionnel
- Date d'inscription: 17 Dec 2008
- Messages: 36
Re: [MapBasic] automatisation échelle graphique
oui voila tout ça en lot.
alors ce qui dois changer c'est
- ID=1 (dois aller jusqu'à 132) --> change de commune
- doit être centré et zoomé sur la commune sélectionnée
- le titre de la carte (changer le nom de la commune)
- et l'échelle
les 3 premiers c'est pas un problème j'y arrive mais après ...
Dernière modification par mlking31 (Tue 18 May 2010 13:43)
Hors ligne
#36 Tue 17 May 2011 13:00
- Laurent . M
- Participant occasionnel
- Lieu: Var
- Date d'inscription: 26 Jun 2008
- Messages: 19
Re: [MapBasic] automatisation échelle graphique
Bonjour,
J'ai lu avec intérêt cette discution, et j'aimerai bien connaitre la suite si elle existe ou si elle à été transposé sur un autre post.
Merci,
Cordialement,
Hors ligne


