[v8i SS3 MDL] Custom IconCmds are not loaded at startup

Hi,

Custom IconCmds are not loaded at startup if you dock them on sides of screen. My custom application's icons are not displayed and I receive attached warning messages as shown below. My application is loaded with variable MS_DGN_APPS. There is also MS_INIT_APPS but I failed to load it using this variable. I will appreciate any solution to be able to display icons properly without warning. 

Parents
  • Unknown said:
    I will appreciate any solution...

    It's hard to comment without more evidence:

    1. Are your icons stored in a resource (.r) file?
    2. Do you have at least two icon sizes for each icon?
    3. Are you icons used in your own toolbox or dialog?

    One way to illustrate your problem is to take a known good small example (e.g. basic, delivered with the SDK) and add your resource to that app., together with a key-in that pops your toolbox.

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:

    Are your icons stored in a resource (.r) file

    Yes.

    Unknown said:

    Do you have at least two icon sizes for each icon?

    Yes.

    Unknown said:

    Are you icons used in your own toolbox or dialog?

    My icons are in my toolbox. In the same toolbox, there are icons from MicroStation too, but they are displayed properly.

    Unknown said:

    One way to illustrate your problem is to take a known good small example (e.g. basic, delivered with the SDK) and add your resource to that app., together with a key-in that pops your toolbox.

    I will try, thanks.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Unknown said:

    What is your definition of MS_DGNAPPS?

    AK is my application.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • A drawback with defining the MS_DGNAPPS applications using the Configuration dialog is that you have no control over the order in which those apps. are loaded.

    You can modify the order of loading if you edit the configuration file where AK is defined as an MS_DGNAPPS member.  Find the file where that definition is written, probably your User Configuration File (*.ucf).  It will look something like this...

    MS_DGNAPPS > AK

    You can change the order of loading by using the prefix symbol rather than the suffix symbol...

    MS_DGNAPPS < AK

    Make that change, and see if affects the order of loading.

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:

    A drawback with defining the MS_DGNAPPS applications using the Configuration dialog is that you have no control over the order in which those apps. are loaded.

    You can modify the order of loading if you edit the configuration file where AK is defined as an MS_DGNAPPS member.  Find the file where that definition is written, probably your User Configuration File (*.ucf).  It will look something like this...

    1
    MS_DGNAPPS > AK

    You can change the order of loading by using the prefix symbol rather than the suffix symbol...

    1
    MS_DGNAPPS < AK

    Make that change, and see if affects the order of loading.

    I changed content of UCF file as follows.

    C:\ProgramData\Bentley\AECOsimBuildingDesigner V8i\WorkSpace\Users\BuildingDesigner.ucf

    MS_DGNAPPS = BLDDESIGNER
    MS_DGNAPPS > ARCHITECTURE
    MS_DGNAPPS > STRUCTURAL
    MS_DGNAPPS > HVAC
    MS_DGNAPPS < AK
    MS_DGNAPPS > SERVER

     It doesn't affect loading and I still receive below warnings;

    1 Unable to load/create dialog item of type 'IconCmd', id = 4 from dialog "AK"
    2 Unable to load/create dialog item of type 'IconCmd', id = 45 from dialog "AK"
    3 Unable to load/create dialog item of type 'IconCmd', id = 44 from dialog "AK"
    4 Unable to load/create dialog item of type 'IconCmd', id = 46 from dialog "AK"

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Unknown said:
    MS_DGNAPPS = BLDDESIGNER
    MS_DGNAPPS > ARCHITECTURE
    MS_DGNAPPS > STRUCTURAL
    MS_DGNAPPS > HVAC
    MS_DGNAPPS < AK
    MS_DGNAPPS > SERVER

    Read MicroStation help to understand the rules about configuration variable syntax.

    What happens if you edit that list to look like this?

    MS_DGNAPPS = AK
    #MS_DGNAPPS = BLDDESIGNER
    #MS_DGNAPPS > ARCHITECTURE
    #MS_DGNAPPS > STRUCTURAL
    #MS_DGNAPPS > HVAC
    #MS_DGNAPPS < AK
    #MS_DGNAPPS > SERVER

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:

    What happens if you edit that list to look like this?

    1
    2
    3
    4
    5
    6
    7
    MS_DGNAPPS = AK
    #MS_DGNAPPS = BLDDESIGNER
    #MS_DGNAPPS > ARCHITECTURE
    #MS_DGNAPPS > STRUCTURAL
    #MS_DGNAPPS > HVAC
    #MS_DGNAPPS < AK
    #MS_DGNAPPS > SERVER

    Icons aren't still loaded.

    I think AECOSim Building Designer is trying to load iconcmds before loading MS_DGNAPPS. But standard MicroStation tools and ARCHITECTURE tools are displayed properly.

    I tried myapp and v550new examples, their docked tooboxes on top (under menubar) are not displayed too.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Unknown said:
    I think AECOSim Building Designer

    Well, that can't be right.  The pound (#) signs start a comment in a configuration file.  In the above list, your application is the only app. specified as an MS_DGNAPPS, because the others are all comments  In other words, if AECOSim is still being loaded, there must be another configuration file somewhere that causes it to load.

     
    Regards, Jon Summers
    LA Solutions

  • Hm, i tested with my own app on AECOSim SS4 (MS SS3) and it works for me (with docked toolbox). My app is even loaded as MS_DGNAPP and the only thing I check is

    if (INVALID_MODELREF != mdlModelRef_getActive()) {

    to prevent trying to add my menu entries, before the UI is shown.

    3 remarks from me.

    1. after you installed AECOSim, you should have got 6 icons, to launch different configs. One is titled MicroStation Building Designer and does not load  the rest of the verticals, try this to ensure no influences from Architecture/Structural/HVAC  ( take care, this is a different config and a different user so you have to dock your toolbox again.

    2. I got a similar error, after my colleague inserted a function (3dmodify - pure MS) in our custom task that is no longer available in SS3. So make sure there is not another version of your file that might get loaded in the first call.

    3. Have you tried with another user  ? Rarely, but with a bigger chance on my developing machine, I got corrupted upf files.

    Something I found in my ma, and where I don't remmeber when it was changed,  where the following 3 lines

    	// mdlWindow_organizeApplicationArea (); // to reposition the previously opened window
    	mdlDialog_autoOpen(&nFrames, RTYPE_IconCmdFrameX, TRUE);
    	mdlDialog_autoOpen(&nFrames, RTYPE_ToolBox, TRUE);

    I commented the first out, which was in there for nearly a decade, but I'm not sure if this happened in XM or V8i timeframe.

    HTH Michael



  • Avoid changing foreign config files !

    if you liek your app to load, do not touch the UI nor any of the existing configs, just create <myappname>.cfg in the config\appl directory of the installation, make sure you're not only expanding the MS_DGNAPPS, but even the MS_MDLAPPS. to asure the correct path and do not make copies of your app in the installation dirs.

    Mine looks like this:

    MS_MDLAPPS < C:\CAD\DeskWare\MicroStation/
    MS_ICONRSCLIST < C:\CAD\DeskWare\MicroStation/*.rsc
    MS_DGNAPPS > dwgen3.ma

    as I (meanwhile) have a mixed icon structure (some old internal ones and all newer in the rsc file) I need the second line additionally.



  • Jon and Michael, thank you for your valuable information and sharing your time with me.

    I found the reason. I had collected all initialization codes into a function that is trigerred with a queued command. Inside initialization function, I am opening resources, register commands, basic MDL initializations and setting custom functions for tracking tasks.

    Because initialization is delayed, resources are not being opened on startup when my application is launched as a design application. I moved opening resource and other MDL system initialization processes into main() and problem is solved on AECOsim Building Designer SS3.

    Interesting side of this problem is same initalization routine does not make any icon display problem on MicroStation SS2.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

    Answer Verified By: Sedat Alis 

  • Glad you made it, and as my colleague is almost saying: Describing the problem to someone else, is mostly a good way to find a reason or solution.



Reply Children
No Data