2

I need to reorder the fields in a tab file from within QGIS modeler. Table Manager plugin allows this but I can't seem to find a way to do this in modeler. It needs to be run on thousands of files.

Can we import/use plugins like table manager in the graphical-modeler or in the python window?


@Olle - I don't see the same options. How do I add them to my toolbox? They are active in processing-->options

Active in processing option

My processing modeler

3

in the graphical modeller you have the opportunity to refactor fields wihtin a vector layer.

refactor table of vector layer

There you can reorder fields like in the table Manager plugin. In a second step you could use this model with processing.runalg("modeler:youmodelname", inputlayer, outputlayer)in the console to iterate trough all desired files.

  • thanks but I don't see these tools. See edits to the question. – GeorgeC Nov 12 '15 at 9:18
  • 1
    Hello GeorgeC, run processing.alglist("refactor") in the python console and see whether the algorithm is available, registered correctly. This might be a Installation or Version Problem. I used QGIS 2.8 for the above example. – Olle Onkel Nov 12 '15 at 9:39
  • 1
    @GeorgeC - Looking at your screenshot in your question, I think your Processing Toolbox is using the Simplified interface. You can see this at the very bottom of the toolbox, click on it to change it to Advanced interface. "Refactor" should be in the list now. otherwise it may be a versioning issue as @OlleOnkel mentioned. Also his tip of searching for it in the Python Console is good advice, just remember to use import processing first :) – Joseph Nov 12 '15 at 11:07
  • @Joseph thanks...I was trying to find this in the Graphical Modeler...once you change the processing toolbox to advanced the graphical modeler also reflects this. – GeorgeC Nov 12 '15 at 22:11
  • I'm not able to find this tool, either. I've searched for it in the python console in QGIS 2.8 and 2.12, but only get a NameError message. I have the "Advanced interface" option selected, as well. Any thoughts on what I'm missing? Thanks – b-rad-b Dec 7 '15 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.