Hi!
I hope you can help with this very basic problem of mine..(although too much to handle for me).
So, what I want to do is load data into a sde database. It´s annotations, in coverage format. And what I have seen so far of the result when I only use a simple ”in-data to out-data”-workspace in FME is that the texts don´t end up in a correct way. There are overlaps for example. Then I thought that the only way to do it correctly is with the ”Import Coverage”-tool in ArcGIS. So I created a simple Model Builder model which I then exported to a python script. Below is a screen shot of the model and further down is the script.
Script from model export:
# Import arcpy module
import arcpy
# Local variables:
tx_24_annotation_tx_24 = "D:\\\\Vagkarta\\\\Shape\\\\vk_24_Sweref_99_TM_shape\\\\vagk\\\\24\\\\tx_24\\\\annotation.tx_24"
tx_25_annotation_tx_25 = "D:\\\\Vagkarta\\\\Shape\\\\vk_25_Sweref_99_TM_shape\\\\vagk\\\\25\\\\tx_25\\\\annotation.tx_25"
sde_gsd_GNG_vk_tx_anno_modelb = "O:\\\\Kartor\\\\Vagkarta\\\\Anslutning till dsgeosecma_sde_gsd@gng.sde\\\\sde_gsd.GNG.Johan_Anders_test_Vagkarta\\\\sde_gsd.GNG.vk_tx_anno_modelb"
# Process: Import Coverage Annotation
arcpy.ImportCoverageAnnotation_conversion("D:\\\\Vagkarta\\\\Shape\\\\vk_24_Sweref_99_TM_shape\\\\vagk\\\\24\\\\tx_24\\\\annotation.tx_24;D:\\\\Vagkarta\\\\Shape\\\\vk_25_Sweref_99_TM_shape\\\\vagk\\\\25\\\\tx_25\\\\annotation.tx_25", sde_gsd_GNG_vk_tx_anno_modelb, "100000", "CLASSES_FROM_LEVELS", "NO_MATCH", "REQUIRE_SYMBOL", "STANDARD", "", "AUTO_CREATE", "AUTO_UPDATE")
This is a part of a load process and I would like the whole process to be in the FME workspace, so I thought the PythonCaller could help. But I understand now that I can´t use the script in the form it is above (copy the script in the .py-file and paste in to PythonCaller). I also want to be clear with one thing: I´m totally new to Python, that´s why I seek basic assistance. I read som documents about Python in FME but I just can´t incorporate that into how I should write the script in a proper way. I guess there should be some corrections and adjustments to make it work. For example import fmeobjects and some "def" or "class"? And is it even possible when the script consists of two feature classes (the in-data)?
Also, I don´t understand what to write in the ”Class or Function to Process” box either. As I said, Python is new to me.
I hope you understand what I’m trying to do. Perhaps I don´t even need to use the PythonCaller or Model Builder.
Thanks in advance
Johan