Is there a way to pre-set XFM option for saving DGN charts to different value?

Hello everyone, I have a question:

Lets say I'm trying to save DGN. Save As dialog is opened and you can see the possibillity to tinker with the Options. Is there a way to prepare settings that will be put into the current Options?

Screenshot example:

This is the default XFM value. However, I would like it to be 

by default. Is there a way to achieve that(lets say from code - or are there other options to preset it from different place)? Thanks for any answers

Parents
  • Changing the default settings is not accomplished with the typical Seed File settings, but their are ways they can be set with VBA code or the OpenCities Map MDL API's.  If this is something you would be interested in pursuing please open a New Case and we can work together to get it done.



  • Can i move this thread then to Microstation programming, if the possibillity of coding the change exists? Or you mean that the functionality does not exist and need to be implemented as new feature in upcoming OpenCities updates? Thanks

  • This code was offered by the Map Programming staff, and is available in the Map SDK documentation:
    ---

    FeatureInstanceConvertModeDuringFileSaveAs

    Summary

    Read/Write FeatureInstanceConvertMode value specifying the feature instances that are converted during "Design File Save As" processing.

    Default value is featureInstanceConvertModePreserveXFMData.

    Syntax

    object.FeatureInstanceConvertModeDuringFileSaveAs [=FeatureInstanceConvertMode]

    Part

    Description

    object

    A valid FeatureMgr object

    FeatureInstanceConvertMode

    A FeatureInstanceConvertMode expression.


    Example

    Example
    ' Save current state
    Dim currentConvertMode As FeatureInstanceConvertMode
    Dim currentApplyFeatureInferenceRulesDuringFileSaveAs As Boolean
    Dim currentApplyLegacyDFSRulesDuringFileSaveAs As Boolean

    currentConvertMode = xft.FeatureMgr.FeatureInstanceConvertModeDuringFileSaveAs
    currentApplyFeatureInferenceRulesDuringFileSaveAs = xft.FeatureMgr.ApplyFeatureInferenceRulesDuringFileSaveAs
    currentApplyLegacyDFSRulesDuringFileSaveAs = xft.FeatureMgr.ApplyLegacyDFSRulesDuringFileSaveAs

    ' Enable feature instance conversion during File Save As processing
    xft.FeatureMgr.FeatureInstanceConvertModeDuringFileSaveAs = FeatureInstanceConvertMode.featureInstanceConvertModeXFMV1ToV2

    xft.FeatureMgr.ApplyFeatureInferenceRulesDuringFileSaveAs = False
    xft.FeatureMgr.ApplyLegacyDFSRulesDuringFileSaveAs = False

    ActiveDesignFile.SaveAs "c:\temp\newfile.dgn", True, msdDesignFileFormatV8

    ' Reset feature instance conversion state
    xft.FeatureMgr.FeatureInstanceConvertModeDuringFileSaveAs = currentConvertMode
    xft.FeatureMgr.ApplyFeatureInferenceRulesDuringFileSaveAs = currentApplyFeatureInferenceRulesDuringFileSaveAs
    xft.FeatureMgr.ApplyLegacyDFSRulesDuringFileSaveAs = currentApplyLegacyDFSRulesDuringFileSaveAs

    ---

    xfmSystem_setFeatureInstanceConvertModeDuringFileSaveAs

    Summary

    Sets conversion mode value specifying the feature instances that are converted during "Design File Save As" processing.

    Default value is XFMFEATUREINSTANCECONVERTMODE_PreserveXFMData.

    See Also:

    xfmSystem_getFeatureInstanceConvertModeDuringFileSaveAs.

    FunctionPublished XfmFeatureInstanceConvertMode xfmSystem_setFeatureInstanceConvertModeDuringFileSaveAs(XfmFeatureInstanceConvertMode convertMode)

    Required Header

    <xfmApi.fdf>

    Required Library

    xfmApi.dlo for MDL source
    xfmApi.lib for C source

    Return Value

    Returns XfmFeatureInstanceConvertMode value specifying the previous state of this setting.

    Parameters

    Item

    Description

    convertMode

    XfmFeatureInstanceConvertMode value.

    Example

        XfmFeatureInstanceConvertMode currentConvertMode = XFMFEATUREINSTANCECONVERTMODE_XFMV1ToV2;    xfmSystem_setFeatureInstanceConvertModeDuringFileSaveAs(currentConvertMode);

     



  • You can also use a key-in to set the option "Remove OpenCities Map Specific Data": 
    calculator gXfmSaveAsConvertOptions.convertMode=3

    Next open the Save As dialog with the keyin: Save As v8

    Answer Verified By: Lubo B 

Reply Children