Filo diretto con i geologi italiani    
 
Non sei ancora iscritto ?
Compleanni di Oggi
Carlo Tersigni (79), cristinamil (60), marco pannucci (54), Silvio Ferrero (45)
Chi è Online Ora
1 membri (geomo), 1,000 ospiti, e 3 robot.
Chiave: Admin, Mod Globale, Mod
Top Poster(30 Giorni)
fabgeo 2
mausca 2
Devid 2
Sponsor
GeoFoto
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
Riconoscimento roccia
Riconoscimento roccia
by rama12, April 17
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
pozzo artesiano con grosso problema.
by anticlinale - 27/05/2026 10:03
Certificazioni paleontologiche
by Liviozi - 21/05/2026 10:36
Cerco sismografo PASI GEA
by Devid - 20/05/2026 20:53
vendo penetrometro statico SUNDA
by gp - 19/05/2026 14:32
Statistiche del Forum
Forum34
Discussioni21,067
Post147,853
Membri18,151
Massimo Online6,195
Dec 9th, 2025
Nuovi Membri
Cuccarese F., Manuela GPR, Vitani, dario11, pgrimaldi
18,150 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.015s Queries: 21 (0.004s) Memory: 2.9344 MB (Peak: 3.2529 MB) Data Comp: Off Server Time: 2026-06-08 14:12:19 UTC
Valid HTML 5 and Valid CSS