New answers tagged scripting
I'm not familiar with this feature but there seems to be some .net methods and properties: IFrameElement.DraftMode Property AND IFrameDraw.DrawDraftMode Method
If it were possible to do this then there should be a property to do it in the DataFrame (arcpy.mapping) help. There is not, and to me that makes sense because draft mode seems to be a graphic effect of the ArcMap application. To do something which is effectively the same, I think you will need to write some ArcPy code to save your layers (perhaps as layer ...
I'm not sure about how to do this in Python other than using ArcObjects directly through COM interop - hardly the most pleasant approach. It's much easier to do in .NET, though for simplicity you will want the SDK and that's not available for download - I believe it comes with ArcGIS Desktop install media? And definitely with an EDN licence, of course, but ...
You can redirect generated folder/files to a temporal directory of your operating system, so that they don't bother you anymore. For instance, in GNU/Linux I can use /tmp to store all those logs and directories. You would need to change a part of your script (where you create QApplication and set QgsApplication properties), like this: QgsApplication( , ...
I found an alternative which is to delete those 'processing' folders by using the following code: import shutil shutil.rmtree('/folder_name') I do feel very uncomfortable having a script which deletes files/folders but it does keep my directories tidy. Hopefully there is a way to disable these logs from being produced in the first place.
This should be enough to get the extent of your Shapefile: layerPath = path_dir + "Input district shapefile\\" + "District.shp" extent = QgsVectorLayer( layerPath, '', 'ogr' ).extent() The result is a QgsRectangle object, which has xMinimum(), xMaximum(), yMinimum(), and yMaximum() methods.
The algorithm you are running requires some references to common QGIS components, which are available to plugins via an iface (QgisInterface) object. In this case you need a custom iface object because i) there is no QGIS instance running, ii) you are running a plugin, and iii) the algorithm you are running requires access to QGIS components (e.g. map ...
Finally found the proper way of running processing algorithms in PyQGIS standalone scripts. This answer is based on answers to Problem with import qgis.core when writing a stand-alone Python script that uses QGIS and to Error: Algorithm not found, which is in turn based on a Qgis-dev mailing-list discussion. I suggest you to follow the work flow given in ...
This answer is based on answers to Problem with import qgis.core when writing a stand-alone Python script that uses QGIS and to How to use QGIS explode lines with Python. I suggest you to follow the work flow given in Problem with import qgis.core when writing a stand-alone Python script that uses QGIS to enable your QGIS libraries in your OSGeo4W Shell. ...
go to this address and download .COX http://www.ocxme.com/ OR http://www.ocxme.com/ocx/download/3364/MSFLXGRD.OCX
Top 50 recent answers are included