Skip to main content

In the attributemanager, I declare the igds_model_name which is an atttribute for the model name and is determined by feature_type. Therefore in theory every feature should be written to their respective model. I also declared the model names in the seed file of the dgn, but for some reason the specific features are not written to their respective model. I was wondering whether it's possible to write features to different models in a dgn file and how one is able to do that.

 

afbeelding

yes


yes

huhm, how is one able to do that?


  • expose format attributes igds_model_id and igds_model_name in reader
  • create one master dgn file(seed file) which will have all the models in it.
  • while writing to dgn file , just before writer , modify the attribute igds_model_id and igds_model_name to your model id and name.(seed dgn file should have this model id and name)

Make sure you define both  "igds_model_id" and "igds_model_name". I only see Igds_model_name in your example. Also double check the naming syntax for igds_model_name, there are some characters in you are not allowed to use in a model name.


Make sure you define both  "igds_model_id" and "igds_model_name". I only see Igds_model_name in your example. Also double check the naming syntax for igds_model_name, there are some characters in you are not allowed to use in a model name.

Thanks you for pointing that out. By exposing igds_model_name and Igds_model_id and adding the igds_model_id by using the AttributeValueMapper (with info from an excel)

I managed to deliver output to several models. However not all used models do have output. So I think you are right with that the naming syntax is not right. Do you know a source that gives information about the naming syntax in regards to igds_model_name? I changed the type to char and adjusted the width to 50 characters, but to no avail. I am for example struggling with the following model name: B-OI-KL-BUISLEIDING_OLIEGASCHEMICALIEN_GASLAGEDRUK-G

It's the same name as in the feature as in the model in the seed file, but still features are not written to this model nameafbeelding


huh I disovered something weird, the features are written to several models in the dgn file, but the dgn file is missing some models compared to the seed file.

it looks likes on a certain moment it stopped creating the models see in the image below. Is there such thing as a maximum amount of models that can be written in fme desktop?

Right is het seed file, see red box for the model names that appear in the dgn file (left image). So for some reason it stopped creating the models in the dgn file. I don't think it's due to naming syntax, since the model "B-OI-KL-ET_LANDELIJKHOOGSPANNINGSNET-G" was written to the dgn file and there is another model "B-OI-KL-BUISLEIDING_THERMISCH_WARMTE-G" that has a slightly shorter name. I also tried shorter names for models, but still the models were not visible in the dgn file.

afbeeldingafbeelding


If you already have the level names in the seed file and referencing the same ones, then I don't think it is a Syntax issue as well. Also, I have had hundreds of models created before, so I don't think it is a limitation issue either. I suspect it could be a model ID index referencing issue. How are you determining what model ID to assign each models? Keep in mind the index model ID is assigned when you first create the model in the seed file, in the order the models are created. If you were to delete a model, that index ID is skipped.

 

You can read the seed file in FME (given there are at least one element in each model), to confirm what model_ID has been assigned for each model. I think the "Default" model has model_id value of 0.


If you already have the level names in the seed file and referencing the same ones, then I don't think it is a Syntax issue as well.  Also, I have had hundreds of models created before, so I don't think it is a limitation issue either.  I suspect it could be a model ID index referencing issue.  How are you determining what model ID to assign each models?  Keep in mind the index model ID is assigned when you first create the model in the seed file, in the order the models are created.  If you were to delete a model, that index ID is skipped.

 

You can read the seed file in FME (given there are at least one element in each model), to confirm what model_ID has been assigned for each model.  I think the "Default" model has model_id value of 0.

Hello Ahmedster, thanks for answering. I was also thinking in that line of direction, but I don't think that the model index is the issue r maybe I am overlooking something. 

To clarify that, I made a copy of the seed file (that contains the complete list of models) and created some elements in the models that are not visible in the output dgn. Thereafter I checked this file in the inspector to look for the model id. 

Let's see we have for example the modelname B-OI-KL-DATA-G with a model id of 10 (that's is thus in the seed file).

afbeeldingIn my FME script I declared the model-id with the help of AttributeValueMapper based on an excel file with the model names and the model id.

Afterwards, all the features now have a model-id and let's pick again B-OI-KL-DATA-G. This one has a model-id value (10) that has the same value as in the seed file. Models starting from model 10 don't seem to work. I see in the translation log the following messages. Does it might have to do that the models are not written.

The workspace may run slower because features are being recorded on all output ports.
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.feature' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.handler_id' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.handler_type' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.isValid' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.linkType' set with an appropriate value
Further instances of this message will be suppressed
DESIGN WRITER: Failed to find model with name 'IO_IN_Bomen-nieuw' in seed file. Writing related features to the default model
DESIGN WRITER: Failed to find model with name 'IO_IN_Bomen-nieuw' in seed file. Writing related features to the default model
... Last line repeated 3 times ...
Further instances of this message will be suppressed
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
-~                                                                             ~-
-~    Feature caches have been recorded at every stage of the translation.     ~-
-~                      To inspect the recorded features,                      ~-
-~              click the feature cache icons next to the ports.               ~-
-~                                                                             ~-

 

afbeelding


Hello Ahmedster, thanks for answering. I was also thinking in that line of direction, but I don't think that the model index is the issue r maybe I am overlooking something. 

To clarify that, I made a copy of the seed file (that contains the complete list of models) and created some elements in the models that are not visible in the output dgn. Thereafter I checked this file in the inspector to look for the model id. 

Let's see we have for example the modelname B-OI-KL-DATA-G with a model id of 10 (that's is thus in the seed file).

afbeeldingIn my FME script I declared the model-id with the help of AttributeValueMapper based on an excel file with the model names and the model id.

Afterwards, all the features now have a model-id and let's pick again B-OI-KL-DATA-G. This one has a model-id value (10) that has the same value as in the seed file. Models starting from model 10 don't seem to work. I see in the translation log the following messages. Does it might have to do that the models are not written.

The workspace may run slower because features are being recorded on all output ports.
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.feature' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.handler_id' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.handler_type' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.isValid' set with an appropriate value
DESIGN WRITER: Could not find the tag value. This may result in creating an empty tag. Make sure the feature has the attribute 'igds_xattributes{}.linkType' set with an appropriate value
Further instances of this message will be suppressed
DESIGN WRITER: Failed to find model with name 'IO_IN_Bomen-nieuw' in seed file. Writing related features to the default model
DESIGN WRITER: Failed to find model with name 'IO_IN_Bomen-nieuw' in seed file. Writing related features to the default model
... Last line repeated 3 times ...
Further instances of this message will be suppressed
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
-~                                                                             ~-
-~    Feature caches have been recorded at every stage of the translation.     ~-
-~                      To inspect the recorded features,                      ~-
-~              click the feature cache icons next to the ports.               ~-
-~                                                                             ~-

 

afbeelding

Well well.... it looks like you are absolutely correct.  There does seem to be a limitation of 10 models, including the Default.  I just did a quick test, and with the eleventh model I get the error ("Model_11" does not exist. Do you want to rebuild the model list?).  I'd thought I written much more models in the past with FME, but perhaps I was using Microstation VBA.  Maybe at this point you want to contact Safe and determine if this is intentional or a bug.

Goodluck.


Reply