Compressing design changes features definition?

Hello

I have strange behavior in Bentley Map SS2

I have changed gasMain example, to use different feature display name than name:


// Initialize "GasMain" root feature definition
xfmFeatureDef_new (&featureDef);xfmFeatureDef_setName (featureDef, L"GasMain");

xfmFeatureDef_setDescription (featureDef, L"Gas Main linear feature");

xfmFeatureDef_setDisplayName (featureDef, L"Gas Main dsp");

xfmFeatureDef_setCategoryName (featureDef, L"Gas");



And created features have attribute "Display name":

 

 <GasMain displayName = " Gas Main DSP "i =" 127b5e26-dbcd-41a3-a8f4-ae3a754472f4 ">

     <ID displayName="Id" type="STRING">1000</ID>
     ...
 </GasMain>
But after "compress design" operation it's changes:
 
<GasMain i="127b5e26-dbcd-41a3-a8f4-ae3a754472f4">
  <ID type="STRING">1000</ID>
  ...
     </GasMain>
   Why?
--- 
Regards
Daniel Gontarek
  • Daniel,

    Are you running the modified gasmain application in the geo_example_designer workspace? Attached is slightly modified gasmain.c source code that when tested in the Bentley Map V8i (SELECTseries 3) 08.11.09.107 commercial release seems to work as expected with the display name override persisted after a file compress.

    Could you please test the same modifications and let me know your findings?

    Regards,

    Jeff Bielefeld [Bentley]



  • Hello

    > Are you running the modified gasmain application in the geo_example_designer workspace?

    No, just in msgeo workspace. My goal is to create features and properties dynamically (based on own database model) - not using geospatial administrator.

    I tried Your code - the same effect after dgn compressing. In the geo_example_designer workspace this effect does not occur, but I think feature "GasMain" is defined in workspace.

    When I modified (in Your source)  feature name form "GasMain" to "MyGasMain" then problem occurs in geo_example_designer workspace as well (see attached file). 

    Regards.

    Daniel Gontarek

  • Daniel,

    I updated my local test case to work outside of the geo_example_designer workspace and have been able to replicate the reported behavior. I will file an issue to be resolved in the upcoming Bentley Map V8i (SELECTseries 4) release.

    Regards,

    Jeff Bielefeld [Bentley]



  • Hello again :)

    Now I'm trying this code on Bentley Map SS4 and the conclusion is as follows:
    1. In fact, now file compression do not change features definitions
    2. Unfortunately described behavior is after file closing and reopening (or restarting Bentley Map). Additionally I noticed, that INT or DOUBLE properties, are changed type to STRING :(

    Regards,

    Daniel Gontarek
  • Daniel,

    For 1 are you saying the previously reported issue involving file compress has been fixed? Also you should be aware that xfmFeatureDef_get/setKeepInSession functions are available which can be used to keep a feature definition in the session after feature instances of its definition are removed from the session. During compress, processing is similar to file close & file open processing so a dynamic feature definition would normally be removed from the session when its last instance is removed. During file open, the feature definition is inferred from the instance data and therefore loses a custom display name.

    For 2 unless you have an Bentley Geospatial Administrator defined schema or custom runtime code that defines your feature class definitions, including the data types of business properties Bentley Map will use STRING since the data type is not stored as part of the feature instance.

    I will investigate further if you could you provide a complete test case including source code that demonstrates what you are now observing?

    Regards,

    Jeff Bielefeld [Bentley]