Filo diretto con i geologi italiani    
 
Non sei ancora iscritto ?
Compleanni di Oggi
FedeViola (46), Luigi Candido (45)
Chi è Online Ora
0 membri (), 2,802 ospiti, e 2 robot.
Chiave: Admin, Mod Globale, Mod
Top Poster(30 Giorni)
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
VENDO FREATIMETRO NUOVO
by lara.nibbi - 17/04/2026 19:56
Vendo Georesistivimetro multicanale MAE X612EM+
by schappe - 15/04/2026 13:25
Vendo Sismografo PASI 16S24P
by schappe - 14/04/2026 15:47
Vendo penetrometro statico
by Visentin - 14/04/2026 15:40
Cercasi personale tecnico!!! - zona Torino
by Citiemme Srl - 13/04/2026 15:58
Pozzo per irrigazione orto
by Alessandro Diamante - 11/04/2026 19:59
Statistiche del Forum
Forum34
Discussioni21,054
Post147,818
Membri18,135
Massimo Online6,195
Dec 9th, 2025
Nuovi Membri
GAITsrl, AlessandroGiorda, Saracinesca89, countryguy, Mersm
18,135 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.012s Queries: 21 (0.005s) Memory: 2.9351 MB (Peak: 3.2550 MB) Data Comp: Off Server Time: 2026-04-22 13:11:27 UTC
Valid HTML 5 and Valid CSS