Hi
I am trying to create 2 PBA expressions with 2 criterias and I don´t get this to work, the second PBA expression overwrites the first when quering from DB.
See image:
//Tom
I want Main property area number (FAST Registernummer för fastighet)(PBA [Text]) and Main property area sub-number (FAST Områdesnummer för fastighet)(PBA [Omrnr_Ej1]) two sub-features to be text with different symbology which have properties definied in primary-feature.
Do <maxOccurs> setting help to resolve this problem???? and if ,is there any examples how to manage this??
Anyone??
Hi Tom. I think Jeff is the best person to answer your question, and he is a BE Together this week. Sorry for the delay.
Martin
Hi Tom,
The issue was causing by the order of criteria resulting TRUE. For a same symbology key, it will apply the first value where the first criteria result is TRUE.
In your case, each time Critirion “FAST Områdesnummer för fastighet” will be true (FASTTYP_EJ1=FREGNRTX_OMR), it will apply as the value of property Omrnr_Ej1 (PBA=[Omrnr_Ej1]), whatever if criterion “FAST Registernummer för fastighet” is true or not.
You will have to create a sub-feature text for the area sub-number; otherwise I do not see how you can set different symbology by comparing different value of different properties. We can set one PBA at time for one feature. If you want a second PBA, you will need a second feature or sub-feature. Here, you need to make some change into Oracle database. We can display text from several properties values, but each text cannot have different symbology.
I will suggest setting also a default value for each symbology which has been defined by a criterion. In the text features case, it will avoid having no text-features displayed, and it can be use a validation tool in the same time.
Finally, I will suggest you to read guidelines in “Criteria” and “Criteria Performance Notes” section of Help file to improve performance of using of criteria expressions.
CRITERIA
docs.bentley.com/.../GeospatialAdminhelp22.html
CRITERIA PERFORMANCES NOTES
docs.bentley.com/.../GeospatialAdminhelp23.html
I hope that is help. Maybe someone will post a better solution by next week.
Best Regards!
Sebastien Lefrancois
QA Bentley`s GeoSpatial Products
Tom,
If I understand correctly your objective, I believe this can be solved using a PBA based text feature, one in which the displayed text for the feature instance is always driven by PBA expressions rather than the default text string value. Let me try to explain and in the process confirm whether or not this is what you are attempting to define.
First in the "Symbology" section of the "Fk_Fasttext" feature class definition I don't see any problems other that what Sebastien correctly suggested (e.g. adding default values). Your PBA expressions and use of named Criteria are fine. However because "Fk_Fasttext" is a text feature class, by default the text value will come from a user entered text string rather than a business property value. This can be seen by adding placement metadata using "Insert > Text Placement Metadata" command with the "Show Properties At Placement" option enabled. After doing so, under the "Methods" node, take a look at the generated "Place" method parameters, paying special attention to the "stringSourceType" and "stringSource" parameters as shown in the following:
This definition by default would use the user entered text string when creating the text rather than evaluating your criteria and PBA expression. Therefore the first change I suggest that you make would be to change the "stringSourceType" and "stringSource" parameters as follows:
After making this change and exporting your revised XFM project workspace, you should be able to create instances of the "Fk_Fasttext" that reflect your different PBA expressions based upon evaluation of your named criteria.
For your reference, I've attached an archive containing a modified version of your schema that adds color symbology keys and changes text width based upon your named criteria. Please note that in the provided schema I've changed the names of the default project name and user workspace for my local system. The archive also contains a tom1.dgn design file containing 2 "Fk_Fasttext" feature instances, each matching different criteria and therefore using different symbology, levels and PBA expresions as shown here:
And finally, you can reference the "Lot" feature class definition in the delivered Bentley Map geo_example_designer workspace for an additional example of the above described technique.
Please let me know if this solution achieves the desired result.
Regards,
Jeff Bielefeld [Bentley]
Thank you for your answers.
Jeff:
My main goal is to query the information from Oracle, this is read only information, but your suggestion is needed for other products.
Sebastien:
I was trying to follow the instructions for creating a sub-feature text but the explanations is NOT from this world, impossible to understand ( I don´t ).
....you need to make some change into Oracle database
What do you mean by changes??
....We can set one PBA at time for one feature. If you want a second PBA, you will need a second feature or sub-feature.
Thats why I have 2 criterias, they are 2 different features but they have common property. (see image)
[Tom] I was trying to follow the instructions for creating a sub-feature text but the explanations is NOT from this world, impossible to understand ( I don´t ).
[Seb] ....you need to make some change into Oracle database
[Tom] What do you mean by changes??
[Seb] I mean add sub-feature to your main feature into the Oracle Spatial Database, not in GSA/Map.
[Seb]....We can set one PBA at time for one feature. If you want a second PBA, you will need a second feature or sub-feature.
[Tom] Thats why I have 2 criterias, they are 2 different features but they have common property. (see image)
[Seb] You cannot display more than one PBA to the same feature. The criteria allowed you apllied different PBA regarding the query is tru or not. If two or more criteria are true, it will display the first PBA whihc result to TRUE.
Best Regards
Hi Sebastien and all.
We came up with a solution for this issue.
Here is the solution:
->Create a view table to get a "live" copy of FK_FASTTEXT in Oracle and add Metadata and a Primary key to get GSA register the table:
CREATE or replace VIEW FK_FASTTEXT_VW ( FNR_FDS, EXTERNID, DETALJTYP, KOMMUNKOD, KOMMUNNAMN, TRAKT, BLOCKENHET, OMRNR, FASTIGHET, ADAT, MI_STYLE, IDNR, GEOMETRY, OMRNR_EJ1, FASTTYP, TEXT, AREAL, AREAL_1_1000, AREAL_1_2000, AREAL_1_5000, AREAL_1_10000, FASTTYP_EJ1, CONSTRAINT FK_FASTTEXT_VW_PK PRIMARY KEY (IDNR) RELY DISABLE NOVALIDATE)AS SELECT FNR_FDS, EXTERNID,DETALJTYP,KOMMUNKOD,KOMMUNNAMN,TRAKT,BLOCKENHET,OMRNR,FASTIGHET,ADAT,MI_STYLE,IDNR,GEOMETRY,OMRNR_EJ1,FASTTYP,TEXT,AREAL,AREAL_1_1000,AREAL_1_2000,AREAL_1_5000,AREAL_1_10000,FASTTYP_EJ1FROM FK_FASTTEXT WHERE (FASTTYP_EJ1='FREGNRTX_OMR') WITH READ ONLY; INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME,COLUMN_NAME, DIMINFO, SRID) values('FK_FASTTEXT_VW', 'GEOMETRY',mdsys.SDO_dim_array(MDSYS.SDO_DIM_ELEMENT('X',100000,400000,.001),MDSYS.SDO_DIM_ELEMENT('Y',6400000,6700000,.001)), '3011');
commit;
---------------------------------------------------------------------------------------------------------------------------------------------------
Reregister the schema and add the 'FK_FASTTEXT_VW'
->Change the criteria FAST Områdesnummer för fastighet to:
COMPARE("[Fk_Fasttext_Vw:Fasttyp_Ej1]","FREGNRTX_OMR","")
->Set values in the feature Fk_Fasttext_Vw
-> we had to add FROM FK_FASTTEXT WHERE (FASTTYP_EJ1='FREGNRTX_OMR') WITH READ ONLY; because XFM/GSA is handling "null" values in database very bad, its´s quering "null" values as points (LINE)
BIG Thanks to:
Mikko Ala-Juusela (Bentley Finland)
Carlos Martins (Bentley Netherlands)
Monica Henriksson (Bjerking Sweden)
Krister Surell (Surell Consulting Sweden)
for your help to solve this problem.
Regards
Tom