Filo diretto con i geologi italiani    
 
Non sei ancora iscritto ?
Compleanni di Oggi
gorrif (49)
Chi è Online Ora
2 membri (Federico Cotza, 1 invisibile), 666 ospiti, e 3 robot.
Chiave: Admin, Mod Globale, Mod
Top Poster(30 Giorni)
aw8cub 3
AFM 1
Sponsor
GeoFoto
Vendo test di risposta termica
Vendo test di risposta termica
by aw8cub, September 7
Frammento azzurro trovato in strada
Frammento azzurro trovato in strada
by Keccogrin, December 6
Qualcuno sa di cosa si tratta?
Qualcuno sa di cosa si tratta?
by Alex_Bach, September 21
Uovo ?
Uovo ?
by ACM80, August 25
Sponsor
Sponsor
Discussione Precedente
Discussione Successiva
Stampa Discussione
Valuta Discussione
#51672 08/02/2008 09:16
Iscritto: Nov 2006
Posts: 13
V
Junior Member
OP Offline
Junior Member
V
Iscritto: Nov 2006
Posts: 13
ho un problema....
devo convertire uno shapefile da polyline a polylineM
qualcuno mi sa indicare qualche estensione e/o script
da usare o in Arcview 3.x o Arcgis 9.x
Grazie in anticipo a chiunque voglia darmi una mano
grazie

Iscritto: Jan 2008
Posts: 4
S
Junior Member
Offline
Junior Member
S
Iscritto: Jan 2008
Posts: 4
Ciao,
dovresti provare con questo script per arcview 3.x

***inizio script***

'Il tema attivo deve essere di polilinee

'-- Get the active theme ...

theView = av.GetActiveDoc
theCount = theView.GetActiveThemes.Count
If (theCount = 0) then
msgbox.info("There is no active theme to process.","No active theme...")
exit
End
theTheme = theView.GetActiveThemes.Get(0)
theFtab = theTheme.GetFtab
theClassName = theFtab.GetShapeClass.GetClassName.AsString


If (theClassName = "PolyLine") then
theFieldList = theFtab.GetFields.Clone

theShapeField = theFtab.FindField("shape")

'-- Nuovo shape

theNewShapefile = Filedialog.Put("*.shp".AsFilename,"*.shp",
"Enter new shapefile name for "+theTheme.GetName)
If (theNewShapefile = nil) then
exit
End
theNewFtab = Ftab.MakeNew(theNewShapefile,PolyLineM)
theNewFtab.StartEditingWithRecovery
'-- calculate dei valori

theFieldList.RemoveObj(theShapeField) '-- ignore the shape field

theFieldCount = theFieldList.Count - 1
theNewShapeField = theNewFtab.FindField("shape")
theNewFieldList = theFieldList.DeepClone
theNewFtab.AddFields(theNewFieldList)

'-- conversione

For each rec in theFtab
theShape = theFtab.ReturnValue(theShapeField,rec)
theShapeM = theShape.AsPolyLineM



theNewRecnum = theNewFtab.AddRecord
theNewFtab.SetValue(theNewShapeField,theNewRecnum,theShapeM)

For each fld in (0..theFieldCount)
theVal = theFtab.ReturnValue(theFieldList.Get(fld),rec)
theNewFtab.SetValue(theNewFieldList.Get(fld),theNewRecnum,theVal)
End
End '-- For each rec...
Else '-- If the current theme is not a PolyLine theme ...
msgbox.info (theTheme.GetName+" è costituito da "+theClassName.AsString+" non è un tema di polilinee.", theTheme.GetName+" non è un tema di polilinee")
exit
End '-- If (theClassName = "PolyLine") ...
theNewFtab.StopEditingWithRecovery(true)

'-- carica shape...

If (MsgBox.YesNo("Carico il nuovo shape nella vista?",
"Convert to Shapefile",true)) then
newFtheme = Ftheme.Make(theNewFtab)
theView.Addtheme(newFtheme)
newFtheme.Setvisible(true)
End

***fine script***

provalo!
Simona

Iscritto: Nov 2006
Posts: 13
V
Junior Member
OP Offline
Junior Member
V
Iscritto: Nov 2006
Posts: 13
grazie Simona
lo script funziona
ciao


Moderated by  Greenhouse, Valerio_gpk 

Link Copiato negli Appunti
Ultimi Post
Cercasi geologo per collaborazione
by GSI - 20/09/2026 16:12
MISURA TROMINO SU COCUZZOLO ROCCIOSO
by antrea - 16/09/2026 17:10
CERCO PENETROMETRO LEGGERO DPM30
by fabioGeol53 - 16/09/2026 17:08
CERCO PENETROMETRO DINAMICO DPM-30
by fabioGeol53 - 11/09/2026 15:11
Vendo penetrometro
by aw8cub - 04/09/2026 13:35
Statistiche del Forum
Forum34
Discussioni21,093
Post147,897
Membri18,166
Massimo Online17,513
Jul 9th, 2026
Nuovi Membri
GSI, DottSandro, Marco Dora, paola guado, Ludovica DR
18,165 Utenti Registrati
Sponsor
www.geologi.it bar-2
bar-3

Per domande o commenti su questo sito Web info@geologi.it

Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.4.33 Page Time: 0.009s Queries: 21 (0.003s) Memory: 2.9338 MB (Peak: 3.2530 MB) Data Comp: Off Server Time: 2026-09-21 12:20:12 UTC
Valid HTML 5 and Valid CSS