• Re: I have solve rename MUID field

    We tend to do it more clear way..

    MS Access - Update query SET MUID = Prefix & OBJECTID (or just OBJECTID)
    since object ID is already an autoincrement...

    We tried under MU 2014 SP3 without any problems what so ever (junctions, pipes)
    There is also a way how to directly update the field with autoincrement function (access VBA)
    but it's a kind of magic....

    but generally we try to do most of the changes within the MDB geodatabase using MS Access...
  • Redefine Spatial References


    regarding older topic - Project spatial reference - setting new projection ([url=http://forum.mikepoweredbydhi.com/index.php/topic,2321.0.html]http://forum.mikepoweredbydhi.com/index.php/topic,2321.0.html[/url] )

    Is anyone aware of possibility to change [b]already choosen coordination system[/b] to a completely new one within MIKE URBAN project?

    Can this be achieved the way to create blank MU mdb with desired coordination system, then use ArcGIS to perform an export and transform from original mdb to this one?

    I am slightly worried about the structure itself.
    What would you recommend as "most clean" way to transform whole project as a pack?


  • Re: txt to dfs0


    if you are VB Friendly, here you are :)
    It is a function you can call from MS Access Report or slightly change it to run in vbscript...

    Option Compare Database

    Public Function CreateDFS(StationName As String, ItemName As String, EumType As Double, ItemType As Double, TimeField As String, ValueField As String) As String

    Dim TSValue As Double
    Dim TSDate As Date
    Dim TS As TSObject
    Dim TimeVar As Date
    Dim Item As TSItem

    Dim RS As Recordset 'Managing timeseries
    Dim SQL As String
        SQL = "SELECT " & StationName & ".Profile FROM " & StationName & " GROUP BY " & StationName & ".Profile;"
    Set RS = CurrentDb.OpenRecordset(SQL)
    Dim Serie As Variant 'setting dfs0 series names to var Serie
        With RS
            Serie = .GetRows(.RecordCount)
        End With

    Dim Count As String
    Set RS = CurrentDb.OpenRecordset(StationName)
        For Each Ser In Serie
            Set TS = New TSObject
            TS.Time.TimeType = Non_Equidistant_Calendar
            Set Item = TS.NewItem
            TS.Item(1).Name = ItemName  'name of station - set to TS_name ?
            TS.Item(1).ValueType = Instantaneous
            TS.Item(1).EumType = EumType  'select from table > DataType <
            TS.Item(1).EumUnit = ItemType 'default - (jav) ask programmers...
            TS.Connection.FileTitle = Ser
            RS.Filter = "Profile = '" & Ser & "'"
            Set RSfiltr = RS.OpenRecordset
            Count = RSfiltr.RecordCount  'Counting
            RSfiltr.Sort = "[" & TimeField & "]"
            For i = 1 To Count 'stepping on rows & copying values to DFS object
                TS.Time.AddTimeSteps 1
                TSDate = RSfiltr(TimeField)
                TS.Time.SetTimeForTimeStepNr i, TSDate
                TSValue = RSfiltr(ValueField)
                TS.Item(1).SetDataForTimeStepNr i, TSValue
            'Finishing & saving the file
            TS.Item(1).DataType = Type_Float
            TS.Connection.FilePath = "C:\_Model\Calibration\Data\" & Ser & ".dfs0"
        Next Ser
    Set RS = Nothing
    End Function
  • Re: Dealing with Selection

    @Marcus: thank you for good news! Looking forward to try 2k16..

    @ThomasT: Yes, I contacted support, it is registered as an issue.
  • Re: Dealing with Selection

    Obviously you can search them in text content and delete them manualy, but the point is you are representing this selection graphicaly and you want to work with this selection also graphically, otherwise you are not 100% sure what selected features you have. Especially if you work with 1000+ elements!

    I see here only possibility to save another selection (eg the one you dont want  to be selected) and subtract it matematically (or by sql or whatever).

    But this is not fast enough to work with it.

    So the conclusion could be:
    [quote]Eventhough there is advanced possibility of modifying selections - do not use the save and load selection, because you can't then modify any part of this selection, unless you modify it manulay in text mode.[/quote]
    Am I right?
    By the way, this same buggy behaviour is happening on version 2014.
  • Dealing with Selection


    I want to ask if anyone has experience of creating, loading and editing selection.

    We created a new selection in MOUSE module (MU 2012) consisting only from msm_Node elements. Later we load this selection and we want to remove some nodes from it.

    And now the fun begins:
    It is not possible to change any part/element of the selection, it is only possible to add some.

    I went through "Set selectable layers" dialog, checked the MOUSE nodes layer to be sure it is selectable. Nothing happened, still the same result.
    Then i try to look into Selections and SelectedObjects tables in the database, there were some records, so I deleted all those records, thinking that the new selection shoud add here the new MUIDs, but this is not true.

    So please, can you advice how to remove from selection certain parts?
    I know everything about selection was good in all previous versions till 2011, but now I can't deal with it.
  • Re: The Calibration Plots &amp; Reports

    We're now dealing with automatic reporting to *.pdf files.

    I'm very curious if anyone found, if it is possible to change the layout of reported files.

    We managed to change the template XSLT file in C:\Program Files (x86)\DHI\2012\MIKE URBAN\Cfg\ScenarioManagerColor.xslt
    So now it is possible to print (ie with XPS writer) the generated XML file into *.pdf directly from opened XML file from explorer.

    But the layout is very simple. Also there is the possibility to choose output fields, changing the file muTSCompare_Templ.xml in the same directory.

    Yet still I cannot find the possibility to completely change the layout, I have been playing with ScenarioManagerColor.xslt a lot, but if you cannot define a template for the XML output file it is useless.

    So do you know any way to change the layout of that XML file to the desired one (for example not table but only paragraphs)?

    Btw in attachment are both XML and XSLT files, if you are interested how it is done.