Hello!,
I use fdo and c# to connect to spatial data base postgis from Autocad Map 3D, when I insert a new element to a table , the database update attribute 'id' and 'id_rev' (primary key) from a sequence, but in Autocad Map 3d 2014 it appears the new record whith id and id_rev as nulls, and then i can´t modify or delete the entity from Autocad Map
Only when I execute update layer manually, this attributes obtain the new value, and then I can modify or delete this new record. How I update the layer from the code?.
I use layer.forceRefresh() after of :
MgInsertFeatures insertarElementos = new MgInsertFeatures(featureclassName, propiedades);
MgFeatureCommandCollection comandos = new MgFeatureCommandCollection();
comandos.Add(insertarElementos);
layer.forceRefresh()
But, layer.forceRefresh() doesn´t work.
I'd appreciate any help
Hello!,
I use fdo and c# to connect to spatial data base postgis from Autocad Map 3D, when I insert a new element to a table , the database update attribute 'id' and 'id_rev' (primary key) from a sequence, but in Autocad Map 3d 2014 it appears the new record whith id and id_rev as nulls, and then i can´t modify or delete the entity from Autocad Map
Only when I execute update layer manually, this attributes obtain the new value, and then I can modify or delete this new record. How I update the layer from the code?.
I use layer.forceRefresh() after of :
MgInsertFeatures insertarElementos = new MgInsertFeatures(featureclassName, propiedades);
MgFeatureCommandCollection comandos = new MgFeatureCommandCollection();
comandos.Add(insertarElementos);
layer.forceRefresh()
But, layer.forceRefresh() doesn´t work.
I'd appreciate any help
Hi @jcortega,
do we have the same situation with one of the current versions e.g. Map 3D 2019/2020?
I know that there has been some changes for Postgres provider since version 2014.
If that also not work please let me know and I will ask the question to the developer.
Regards
Hi @jcortega,
do we have the same situation with one of the current versions e.g. Map 3D 2019/2020?
I know that there has been some changes for Postgres provider since version 2014.
If that also not work please let me know and I will ask the question to the developer.
Regards
Hi @jcortega,
if it is still not working with current versions it might be another idea to transfer the request to the developer forum.
Please send us short feedback about how we can help.
Regards
Hi @jcortega,
if it is still not working with current versions it might be another idea to transfer the request to the developer forum.
Please send us short feedback about how we can help.
Regards
Hi Brigitte, we have updated our postgresql client and libraries according to our server version.
We have a table (for example diseminado_abastecimiento) defined as:
CREATE TABLE encuesta.rev_t_diseminado_abastecimiento ( id bigserial NOT NULL, geom geometry NULL, capa varchar(254) NULL, material varchar(2) NULL, diametro varchar(7) NULL, estado varchar(1) NULL, municipio varchar(3) NULL, longitud float8 NULL, id_rev bigserial NOT NULL, validez tstzrange NULL, CONSTRAINT diseminado_abastecimiento_material CHECK (((material)::text = ANY ((ARRAY['PC'::character varying, 'FU'::character varying, 'PE'::character varying, 'HO'::character varying, 'FC'::character varying, 'PL'::character varying, 'PV'::character varying, 'PB'::character varying, 'OT'::character varying])::text[]))), CONSTRAINT rev_t_diseminado_abastecimiento_id_validez_excl EXCLUDE USING gist (id WITH =, validez WITH &&), CONSTRAINT rev_t_diseminado_abastecimiento_pkey PRIMARY KEY (id_rev) ); CREATE INDEX rev_t_diseminado_abastecimiento_id_validez_excl ON encuesta.rev_t_diseminado_abastecimiento USING gist (id, validez); COMMENT ON TABLE encuesta.rev_t_diseminado_abastecimiento IS 'Conducciones de abastecimiento de diseminados utilizada por las tabletas y aplicación de Autocad.';
Some of this data are automatically filled by postgresql instance when insert/update data, for example id and id_rev.
The main problem is that when I insert new data from FDO/C# application, the record is correctly stored in database (id and id_rev field obtains its values) but in Autocad this values are null as you can see in attached image. Only when we update the layer manually (clicking with secondary mouse button on the layer and selecting Update layer) the record is correctly updated on Autocad side.
How can I update the layer from FDO/c# code retrieving the current data from database?
I've found a question related to this issue but without answer: https://forums.autodesk.com/t5/autocad-map-3d-forum/auto-refresh-layer-after-inserting-a-feature-in-... .
Regards.
Hi Brigitte, we have updated our postgresql client and libraries according to our server version.
We have a table (for example diseminado_abastecimiento) defined as:
CREATE TABLE encuesta.rev_t_diseminado_abastecimiento ( id bigserial NOT NULL, geom geometry NULL, capa varchar(254) NULL, material varchar(2) NULL, diametro varchar(7) NULL, estado varchar(1) NULL, municipio varchar(3) NULL, longitud float8 NULL, id_rev bigserial NOT NULL, validez tstzrange NULL, CONSTRAINT diseminado_abastecimiento_material CHECK (((material)::text = ANY ((ARRAY['PC'::character varying, 'FU'::character varying, 'PE'::character varying, 'HO'::character varying, 'FC'::character varying, 'PL'::character varying, 'PV'::character varying, 'PB'::character varying, 'OT'::character varying])::text[]))), CONSTRAINT rev_t_diseminado_abastecimiento_id_validez_excl EXCLUDE USING gist (id WITH =, validez WITH &&), CONSTRAINT rev_t_diseminado_abastecimiento_pkey PRIMARY KEY (id_rev) ); CREATE INDEX rev_t_diseminado_abastecimiento_id_validez_excl ON encuesta.rev_t_diseminado_abastecimiento USING gist (id, validez); COMMENT ON TABLE encuesta.rev_t_diseminado_abastecimiento IS 'Conducciones de abastecimiento de diseminados utilizada por las tabletas y aplicación de Autocad.';
Some of this data are automatically filled by postgresql instance when insert/update data, for example id and id_rev.
The main problem is that when I insert new data from FDO/C# application, the record is correctly stored in database (id and id_rev field obtains its values) but in Autocad this values are null as you can see in attached image. Only when we update the layer manually (clicking with secondary mouse button on the layer and selecting Update layer) the record is correctly updated on Autocad side.
How can I update the layer from FDO/c# code retrieving the current data from database?
I've found a question related to this issue but without answer: https://forums.autodesk.com/t5/autocad-map-3d-forum/auto-refresh-layer-after-inserting-a-feature-in-... .
Regards.
Hello!
Have you seen some of this issue , please?
Regards,
José Carlos
Hello!
Have you seen some of this issue , please?
Regards,
José Carlos
Hi @jcortega,
thank you for the update and this question need to be answered by a programmer.
Another possibility to get help from C# specialist might be to create a support case with Autodesk Developer Network (ADN).
Would it be OK if I move the case to Map 3D developer forum?
Regards
Hi @jcortega,
thank you for the update and this question need to be answered by a programmer.
Another possibility to get help from C# specialist might be to create a support case with Autodesk Developer Network (ADN).
Would it be OK if I move the case to Map 3D developer forum?
Regards
Hello, thank you for your attention.
Please, consult to your programmer team and if you want you can also through this question to the ADN and/or Map 3D developer forum. I don't know which is the best way to resolve this issue.
I'll wait for your answer and if I should do anything else, please tell me what must I do.
Regards.
Hello, thank you for your attention.
Please, consult to your programmer team and if you want you can also through this question to the ADN and/or Map 3D developer forum. I don't know which is the best way to resolve this issue.
I'll wait for your answer and if I should do anything else, please tell me what must I do.
Regards.
Hello,
You were able to pass the problem on to the programmers, can they give a solution about updating layer from c#?
Regards,
José Carlos
Hello,
You were able to pass the problem on to the programmers, can they give a solution about updating layer from c#?
Regards,
José Carlos
+Hello Brigitte.Koesterke, are there news about this issue?
It is important for our.
Regards.
+Hello Brigitte.Koesterke, are there news about this issue?
It is important for our.
Regards.
Can't find what you're looking for? Ask the community or share your knowledge.