AutoCAD Map 3D General

Reply
Active Member
agmartin
Posts: 10
Registered: ‎09-24-2012
Message 1 of 3 (168 Views)

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

168 Views, 2 Replies
09-06-2013 04:06 AM

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

Active Contributor
luc.vanlinden
Posts: 44
Registered: ‎03-23-2012
Message 2 of 3 (157 Views)

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

09-06-2013 06:02 AM 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

 

 

Active Member
agmartin
Posts: 10
Registered: ‎09-24-2012
Message 3 of 3 (151 Views)

Re: Auto-Refresh layer after inserting a feature in PostGIS vía FDO Provider

09-06-2013 06:41 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community