Skip to main content

Hello, quite difficult to find the right section for my question, so moderators, please move it in a more suitable one if it is necessary.

 

I create a FGDB with a feature class and a table. The table shall use the OBJECTID of the feature class, so this one shall be created first to be able to use the OBJECTID in the table. Is there a way to create the FGDB in one wb?

 

Thank you,

 

Corina

You can use a FeatureWriter to create the FeatureClass before the Table.


You can use a FeatureWriter to create the FeatureClass before the Table.

Thank you for the prompt answer. Yes, I use the FeatureWriter, but the table shall use the newly created FGDB as input. Can I do it in the same workbench?


Thank you for the prompt answer. Yes, I use the FeatureWriter, but the table shall use the newly created FGDB as input. Can I do it in the same workbench?

I think yes, use the FeatureReader to read the features? If this is not what you are after, please elaborate more what you need.


Thank you for the prompt answer. Yes, I use the FeatureWriter, but the table shall use the newly created FGDB as input. Can I do it in the same workbench?

To make the question simple: I have to create a file that it will be used as an input in the same workbench.

I could do it in 2 different wb: first will create a FGDB with the feature class, the second will overwrite the FGDB, adding the table. I need to have all in a single workflow. I am trying to use an input that it is not yet created and I don't know how to synchronize the steps. Hope it is more clear


Thank you for the prompt answer. Yes, I use the FeatureWriter, but the table shall use the newly created FGDB as input. Can I do it in the same workbench?

What I would do:

  • FeatureWriter to write FeatureClass.
  • FeatureReader to read just written FeatureClass to obtain objectid's.
  • FeatureWriter to write table using objectid's from FeatureClass.

 

A FeatureReader needs a single feature to be initiated. You can use the summary feature of the first FeatureWriter to do that.


That works, thanks a lot for your patience :)

It will create 2 FGDB, first one with the feature class, the other with both, but this is fine.


That works, thanks a lot for your patience :)

It will create 2 FGDB, first one with the feature class, the other with both, but this is fine.

Happy I can help 🙂 explaining what you need and how to fix it can be hard over a forum.

 

Please be aware that the second writer can use the same .gdb, it will only get overwritten if you check the box "Overwrite Existing Geodatabase" under parameters. Also, if you try to create a relationship class you need to have the same file geodatabase for the objectid's to be correct.


Happy I can help 🙂 explaining what you need and how to fix it can be hard over a forum.

 

Please be aware that the second writer can use the same .gdb, it will only get overwritten if you check the box "Overwrite Existing Geodatabase" under parameters. Also, if you try to create a relationship class you need to have the same file geodatabase for the objectid's to be correct.

I have tried to overwrite, but it is locked


Happy I can help 🙂 explaining what you need and how to fix it can be hard over a forum.

 

Please be aware that the second writer can use the same .gdb, it will only get overwritten if you check the box "Overwrite Existing Geodatabase" under parameters. Also, if you try to create a relationship class you need to have the same file geodatabase for the objectid's to be correct.

No, you should not overwrite if you want to have the FeatureClass and the Table in the same file geodatabase.


Reply