#1 Thu 31 May 2007 17:11
- barbs2676
- Participant occasionnel
- Lieu: saint martin d'hères
- Date d'inscription: 24 Feb 2007
- Messages: 19
problème de Mapbasic
Bonjour,
Suite à la création d'une commande d'execution (qui execute un WOR), le fichier d'origine MB qui devrait être compilé en MBX à été compilé en MBO et ne peut s'executer.
est-ce qu'il est possible de transformer ce MBO en MBX?
voici le programme :
Code:
'================================================================================
' Programme écrit en MAP-BASIC V7.5 par Thibault
'================================================================================
'Date de création :30/05/07
'
'-------------------------COMMENTAIRES SUR LE PROGRAMME--------------------------
' Création d'un bouton permettant l'automatisation d'une analyse thématique
' avec une symbologie pré-établie
'--------------------------------------------------------------------------------
'
'---------------------------DECLARATION DES PROCEDURES---------------------------
DECLARE SUB MAIN
DECLARE SUB AT_AEP
'============================================================================MAIN
'----------------------------COMMENTAIRE SUR LE MODULE---------------------------
'Procédure principale
'--------------------------------------------------------------------------------
SUB MAIN
Dim table As string
Note"Bonjour la licence professionnelle Géomatique et Aménagement SIGAIA de Nice"
Create Menu "Analyse thématique" As
"Saunier AEP" Calling AT_AEP,
"Saunier EP"
Create Menu "Menu Saunier" As
"Analyse thématique" As "Analyse thématique"
Alter Menu Bar Add "Menu Saunier"
Run Menu Command AT_AEP
!Workspace
!Version 780
!Charset WindowsLatin1
Open Table "SECTION CADASTRALE (Surf)" As SECTION_CADASTRALE__Surf_ Interactive
Open Table "SECTION CADASTRALE (texte)" As SECTION_CADASTRALE__texte_ Interactive
Open Table "ZONE DE COMMUNICATION (Ligne)" As ZONE_DE_COMMUNICATION__Ligne_ Interactive
Open Table "ZONE DE COMMUNICATION (texte)" As ZONE_DE_COMMUNICATION__texte_ Interactive
Open Table "BATIMENT (Surf)" As BATIMENT__Surf_ Interactive
Open Table "LIEU-DIT (Surf)" As LIEU_DIT__Surf_ Interactive
Open Table "LIEU-DIT (texte)" As LIEU_DIT__texte_ Interactive
Open Table "PARCELLE (Surf)" As PARCELLE__Surf_ Interactive
Open Table "PARCELLE (texte)" As PARCELLE__texte_ Interactive
Open Table "Eau_potable_reseaux" As Eau_potable_reseaux Interactive
Open Table "F:\Données_SIG\Base Réseaux\Repertoire de travail\Eau_potable_ouvrages" As Eau_potable_ouvrages Interactive
Open Table "Eau_potable_poteaux_incendie_tampon" As Eau_potable_poteaux_incendie_t Interactive
Open Table "Eau_potable_appareillages" As Eau_potable_appareillages Interactive
Open Table "Eau_potable_poteaux_incendie" As Eau_potable_poteaux_incendie Interactive
Map From Eau_potable_appareillages,Eau_potable_poteaux_incendie_t,Eau_potable_poteaux_incendie_t,Eau_potable_ouvrages,Eau_potable_reseaux,PARCELLE__texte_,
LIEU_DIT__texte_,ZONE_DE_COMMUNICATION__texte_,SECTION_CADASTRALE__texte_,ZONE_DE_COMMUNICATION__Ligne_,PARCELLE__Surf_,LIEU_DIT__Surf_,BATIMENT__Surf_,SECTION_CADASTRALE__Surf_
Position (0.03125,2.19792) Units "in"
Width 13.2396 Units "in" Height 6.5625 Units "in"
Set Window FrontWindow() ScrollBars Off Autoscroll On
Set Map
CoordSys Earth Projection 3, 1002, "m", 0, 44.1, 43.199291275544, 44.996093814511, 600000, 200000
Center (932859.5392,302806.4966)
Zoom 1.512597344 Units "km"
Preserve Zoom Display Position
Distance Units "km" Area Units "sq km" XY Units "m"
shade 1 with Type values
"chasse" Symbol (34,16711680,12) ,
"fontaine" Symbol (34,65280,12) ,
"poteau incendie" Symbol (34,255,12) ,
"reducteur pression" Symbol (34,16711935,12) ,
"robinet vanne" Symbol (34,16776960,12) ,
"ventouse" Symbol (34,65535,12) ,
"vidange" Symbol (34,8388608,12)
default Symbol (40,0,12)
shade 2 with Type values
"chasse" Symbol (34,16711680,12) ,
"fontaine" Symbol (34,65280,12) ,
"poteau incendie" Symbol (34,255,12) ,
"reducteur pression" Symbol (34,16711935,12) ,
"robinet vanne" Symbol (34,16776960,12) ,
"ventouse" Symbol (34,65535,12) ,
"vidange" Symbol (34,8388608,12)
default Symbol (40,0,12)
Set Map
Layer 1
Display Value
Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Selectable Off
Layer 2
Display Value
Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
Selectable Off
Layer 3
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With Type
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With ID
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 5
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With ID
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 6
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With Nom
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 7
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With Type
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 8
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With NO
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 9
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With NO
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 10
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With NO
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 11
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 Arrow Position Right Font ("Arial",0,9,0) Pen (1,2,0)
With NO
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 12
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 Arrow Position Above Font ("Arial",0,9,0) Pen (1,2,0)
With TEX10
Parallel On Auto Off Overlap Off Duplicates Off Offset 2
Visibility On
Layer 13
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 COAR
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 14
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 TEX10
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 15
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 DUR
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Layer 16
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 IDU
Parallel On Auto Off Overlap Off Duplicates On Offset 2
Visibility On
Set Map Layer 3 Editable
set legend
layer 1
display on
shades off
symbols on
lines off
count on
title auto Font ("Arial",0,9,0)
subtitle auto Font ("Arial",0,8,0)
ascending on
ranges Font ("Arial",0,8,0)
auto display off ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on
set legend
layer 2
display on
shades off
symbols on
lines off
count on
title auto Font ("Arial",0,9,0)
subtitle auto Font ("Arial",0,8,0)
ascending on
ranges Font ("Arial",0,8,0)
auto display off ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on ,
auto display on
Set Window FrontWindow() Printer
Name "NOIRE" Orientation Portrait Copies 1
Papersize 9
Create Cartographic Legend
Position (10.2292,0.21875) Units "in"
Width 2.80208 Units "in" Height 5 Units "in"
Window Title "Légende de Eau_potable_appareillages,...,SECTION_CADASTRALE__Surf_ Carte"
Portrait
Frame From Layer 2
Border Pen (0,1,0)
Frame From Layer 1
Border Pen (0,1,0)
Set Window FrontWindow() Printer
Name "NOIRE" Orientation Portrait Copies 1
Papersize 9
Browse * From Eau_potable_reseaux
Position (0.0729167,0.0520833) Units "in"
Width 12.9792 Units "in" Height 1.625 Units "in"
Row 154 Column 0
Set Window FrontWindow() Printer
Name "Auto Oce 5200 Raster sur B-LDARDANELLI" Orientation Landscape Copies 1
Papersize 201
End Sub
'========================================================================FIN MAINmerci,
Hors ligne
#2 Thu 31 May 2007 17:39
- Maurice
- Membre
- Lieu: Montpellier
- Date d'inscription: 5 Sep 2005
- Messages: 5331
Re: problème de Mapbasic
Bonjour,
Désolé mais tel quel ce programme est un joyeux mélange de Mapbasic, de WOR...et il ne peut pas marcher
Déjà beau que Mapbasic passe au stade mbo...mais ça ne signifie rien!!
C'est bien trop long à expliquer ici mais, si besoin, je peux donner mon téléphone (passez moi pour ça un mail)
A+
Hors ligne


