Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35205 > unrolled thread
| Started by | balparmak@gmail.com |
|---|---|
| First post | 2012-12-20 09:08 -0800 |
| Last post | 2012-12-20 13:18 -0800 |
| Articles | 12 — 5 participants |
Back to article view | Back to comp.lang.python
Data Driven Process balparmak@gmail.com - 2012-12-20 09:08 -0800
Re: Data Driven Process Grant Rettke <grettke@acm.org> - 2012-12-20 11:33 -0600
Re: Data Driven Process balparmak@gmail.com - 2012-12-20 10:08 -0800
Re: Data Driven Process Grant Rettke <grettke@acm.org> - 2012-12-20 12:21 -0600
Re: Data Driven Process balparmak@gmail.com - 2012-12-20 12:39 -0800
Re: Data Driven Process Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-20 21:03 +0000
Re: Data Driven Process balparmak@gmail.com - 2012-12-20 13:21 -0800
Re: Data Driven Process balparmak@gmail.com - 2012-12-20 12:39 -0800
Re: Data Driven Process Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-12-20 20:57 +0000
Re: Data Driven Process Dave Angel <d@davea.name> - 2012-12-20 16:18 -0500
Re: Data Driven Process Jeffrey Ciesla <ciesla@gmail.com> - 2012-12-20 12:41 -0800
Re: Data Driven Process balparmak@gmail.com - 2012-12-20 13:18 -0800
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 09:08 -0800 |
| Subject | Data Driven Process |
| Message-ID | <19696daa-12c8-4a2d-aa6c-ffb60c8505bb@googlegroups.com> |
I need to come up with a Python code to automate a map creation process but I am a little bit of lack of python knowledge. Any help would be much appreciated.
My problem is that I have a 20 mxd file which need an update process in timely manner(this is just one project) and pdf creation for each mxd then appended pdfs. At the moment, I have a tool which creates map index shape file for at the layout view for each mxd.
I want to :
1 Loop through the index shape file's attribute (first one in the table of contents)
2 Select or zoom into first row then
-get mxd name from attribute table(its available in attribute table)
-specify the destinatin folder to save the mxd(i think that I can get that in attribute table as well) or specify it in the code.
-save mxd to specified location
-specify the destinatin folder to save the pdf file
-save pdf to specified location
3 Move to next row and do the same process in step 2
4 When reached the last row append all pdf files created into same locaition as pdfs
5 Close
Please help me!
Any Help would be much appreciated.
Thank you
[toc] | [next] | [standalone]
| From | Grant Rettke <grettke@acm.org> |
|---|---|
| Date | 2012-12-20 11:33 -0600 |
| Message-ID | <mailman.1103.1356024845.29569.python-list@python.org> |
| In reply to | #35205 |
If you set up 2 sample MDX files that are dead simple along with some code to demonstrate what you are attempting, and some unit tests, then you will be helping people to help you. Most people probably do not have experience or familiarity with what you are attemping. On Thu, Dec 20, 2012 at 11:08 AM, <balparmak@gmail.com> wrote: > mxd file -- Grant Rettke | ACM, AMA, COG, IEEE grettke@acm.org | http://www.wisdomandwonder.com/ Wisdom begins in wonder. ((λ (x) (x x)) (λ (x) (x x)))
[toc] | [prev] | [next] | [standalone]
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 10:08 -0800 |
| Message-ID | <70a99fa6-a401-4962-901f-5ea90a673140@googlegroups.com> |
| In reply to | #35205 |
Thank you for your reply Grant, I am trying to attach mxd's but no chance. As you said that i dont have much experience in python. I used to work with VBA but its not an option anymore with new ArcGIS 10. How can I add mxd's here?
[toc] | [prev] | [next] | [standalone]
| From | Grant Rettke <grettke@acm.org> |
|---|---|
| Date | 2012-12-20 12:21 -0600 |
| Message-ID | <mailman.1104.1356028136.29569.python-list@python.org> |
| In reply to | #35209 |
[Multipart message — attachments visible in raw view] — view raw
Maybe try posting them on your blog. On Thu, Dec 20, 2012 at 12:08 PM, <balparmak@gmail.com> wrote: > Thank you for your reply Grant, > > I am trying to attach mxd's but no chance. As you said that i dont have > much experience in python. I used to work with VBA but its not an option > anymore with new ArcGIS 10. > > How can I add mxd's here? > -- > http://mail.python.org/mailman/listinfo/python-list > -- Grant Rettke | ACM, AMA, COG, IEEE grettke@acm.org | http://www.wisdomandwonder.com/ Wisdom begins in wonder. ((λ (x) (x x)) (λ (x) (x x)))
[toc] | [prev] | [next] | [standalone]
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 12:39 -0800 |
| Message-ID | <12b6d648-db26-465e-ba8d-301176d92ab9@googlegroups.com> |
| In reply to | #35210 |
Hi Grant
can you help me with this?
I am working with the python code below in ArcGIS to zoom into a shapefile's attribute table row features without selected until the end of table one by one.
I am trying to use this code but this one requires that a row is selected.
import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
df.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
Any Help?
Thanks
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2012-12-20 21:03 +0000 |
| Message-ID | <50d37d38$0$29967$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #35220 |
On Thu, 20 Dec 2012 12:39:38 -0800, balparmak wrote:
> I am working with the python code below in ArcGIS to zoom into a
> shapefile's attribute table row features without selected until the end
> of table one by one.
>
> I am trying to use this code but this one requires that a row is
> selected.
Then select a row.
When you get an error message that tells you what is required, don't
argue with it, fix the problem that it tells you. If arcpy requires you
to select a row to work with, then you have to select a row to work with.
> import arcpy
> mxd = arcpy.mapping.MapDocument('CURRENT')
> df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
> df.zoomToSelectedFeatures()
How do you expect to zoom to selected features if you have no selected
features? Before this line, you need to select the feature you want to
zoom to.
> arcpy.RefreshActiveView()
>
> Any Help?
--
Steven
[toc] | [prev] | [next] | [standalone]
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 13:21 -0800 |
| Message-ID | <a11ba48d-33cc-4c2d-9e01-167034a41b5f@googlegroups.com> |
| In reply to | #35226 |
On Thursday, December 20, 2012 2:03:52 PM UTC-7, Steven D'Aprano wrote:
> On Thu, 20 Dec 2012 12:39:38 -0800, balparmak wrote: > I am working with the python code below in ArcGIS to zoom into a > shapefile's attribute table row features without selected until the end > of table one by one. > > I am trying to use this code but this one requires that a row is > selected. Then select a row. When you get an error message that tells you what is required, don't argue with it, fix the problem that it tells you. If arcpy requires you to select a row to work with, then you have to select a row to work with. > import arcpy > mxd = arcpy.mapping.MapDocument('CURRENT') > df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0] > df.zoomToSelectedFeatures() How do you expect to zoom to selected features if you have no selected features? Before this line, you need to select the feature you want to zoom to. > arcpy.RefreshActiveView() > > Any Help? -- Steven
what I am thinking is that I can specify the first layer(mapindex shapefile) in the table of contents (using ArcGIS 10) and then specify the row of that attribute table(mapindex's). Create loop to go through the attribute table's record until the end of it.
Thanks again,
[toc] | [prev] | [next] | [standalone]
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 12:39 -0800 |
| Message-ID | <mailman.1108.1356036528.29569.python-list@python.org> |
| In reply to | #35210 |
Hi Grant
can you help me with this?
I am working with the python code below in ArcGIS to zoom into a shapefile's attribute table row features without selected until the end of table one by one.
I am trying to use this code but this one requires that a row is selected.
import arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
df.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
Any Help?
Thanks
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2012-12-20 20:57 +0000 |
| Message-ID | <50d37bb2$0$29967$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #35209 |
On Thu, 20 Dec 2012 10:08:20 -0800, balparmak wrote: > Thank you for your reply Grant, > > I am trying to attach mxd's but no chance. As you said that i dont have > much experience in python. I used to work with VBA but its not an option > anymore with new ArcGIS 10. > > How can I add mxd's here? The same way you would attach any other file. What program are you using to send these posts? Are you using email or Usenet? Posting from a web interface or a smart phone or a desktop application? We are not mind-readers, nor are we watching you, so how can we tell you what button to click or command to give? -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2012-12-20 16:18 -0500 |
| Message-ID | <mailman.1112.1356038342.29569.python-list@python.org> |
| In reply to | #35209 |
On 12/20/2012 01:08 PM, balparmak@gmail.com wrote: > Thank you for your reply Grant, > > I am trying to attach mxd's but no chance. As you said that i dont have much experience in python. I used to work with VBA but its not an option anymore with new ArcGIS 10. > > How can I add mxd's here? MXD doesn't seem to be a text format. So don't try to attach it to a text mailing list. Instead put it on a web site, and put a link to it in your message. You also should attempt to make the sample file(s) small, so people don't have to download something large. Having said that, I personally won't be able to help, as I know nothing about ArcGis. -- DaveA
[toc] | [prev] | [next] | [standalone]
| From | Jeffrey Ciesla <ciesla@gmail.com> |
|---|---|
| Date | 2012-12-20 12:41 -0800 |
| Message-ID | <ede9ec14-5a3a-44ac-a773-4ad3527f0657@googlegroups.com> |
| In reply to | #35205 |
I'm just learning Python, so I doubt I could be much help, but I'd like to see how this progresses, maybe learn a little more about the language.
[toc] | [prev] | [next] | [standalone]
| From | balparmak@gmail.com |
|---|---|
| Date | 2012-12-20 13:18 -0800 |
| Message-ID | <3befb6f8-3b1c-4e60-9a17-5bed8363b803@googlegroups.com> |
| In reply to | #35205 |
I thought that with python you can specify first layer's attribute table in the table of contents and then go through the records in arcgis.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web