I wanna load shape file on qgis start up but when i add it i ask for saved before adding i used following code for this
c='' b=os.path.dirname(os.path.abspath (inspect.getfile(inspect.currentframe()))) c=os.path.abspath(os.path.join(b, os.pardir)) c=c+"/C_final.shp" layer=self.iface.addVectorLayer(c,"Country_map","ogr") but if create macro then i unable to find the path for shape,file i wanna make it path independent and other way if I add this shape file and select the option project on launch and make it default project then it become path dependent how could i make it a path independent and opened it on qgis starup
أكثر...
c='' b=os.path.dirname(os.path.abspath (inspect.getfile(inspect.currentframe()))) c=os.path.abspath(os.path.join(b, os.pardir)) c=c+"/C_final.shp" layer=self.iface.addVectorLayer(c,"Country_map","ogr") but if create macro then i unable to find the path for shape,file i wanna make it path independent and other way if I add this shape file and select the option project on launch and make it default project then it become path dependent how could i make it a path independent and opened it on qgis starup
أكثر...