AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Auto-Refresh layer after inserting a feature in PostgreGIS vía FDO Provider

3 REPLIES 3
Reply
Message 1 of 4
agmartin
803 Views, 3 Replies

Auto-Refresh layer after inserting a feature in PostgreGIS vía FDO Provider

Hi,

 

I am editing a Postgis table using the OSGeo FDO Provider for  PostgreSQL/PostGIS in AutoCAD Map 3D 2012. As i have noticed that the serial type of the ID field does not give an automatic value to de ID field after inserting a new feature in the layer and after checking in (AutoCAD Map seems not to understand de nextval(sequence_name) function in the DEFAULT property of the ID field(thats how the autonumeric numbers work in PostgreSQL)), i am using a database side trigger which gives the next sequence value to the ID field of the new record. The trigger is launched BEFORE inserting a new record.

 

The problem is that after executing the trigger, in AutoCAD Map all the fields are still shown as null, and they are not displayed until i manually refresh the layer.

 

Is there any way to auto-refresh the layer after checking in a new feature?

 

Regards,

Aitor

3 REPLIES 3
Message 2 of 4
luc.vanlinden
in reply to: agmartin

As some confirmation, the same happens a lot working with Oracle (so to me it seems generic anyway). Sometimes nothing gets refreshed, other times I have to perform the refresh manually.

 

On the other hand, with the ID creation in your database (via your trigger), are you able to checkin more then one NEW feature at the same time? Is your ID field the primary key for your datalayer?

 

MAP is to my experience not able to know which feature is what when refreshing as it does not have a key value before the checking. This will make the chekin/refresh operation to fail.

 

If your Primary key value for new features is generated outside map (via a trigger in teh databse), you can only create and checkin one feature at the time.

 

Luc

 

 

Message 3 of 4
agmartin
in reply to: agmartin

Hi,

 

You are right, i only managed to save one NEW feature at the same time, when i check-in.Thats why i finally decided to activate the "Automatic Update" option in the Feature Edit Panel. Now it checks-in automatically when i draw a new feature, and the trigger generates the ID properly, even if i copy 100 features at a time.

 

The problem is that i don´t see the auto-generated ID until i refresh the layer and i need some automatic refresh at least after every 15 minutes or something to avoid manually refreshing the layer after each drawing to see the "real" data.

 

Regards,

Aitor

Message 4 of 4
jcortega
in reply to: agmartin

Hello agmartin and Autocad support team.

After I opened this issue with the same problem I've this post.

Have you solved it?

If you have, can you please explain how?

Else, this is a ping to the support team, please get as a solution.

Regards.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost