Determining APPLICATION with variable

Hi,

I am trying to route the dataset based on discipline and I would like to ask you if you know of any variable that uniquely defines which application is running on top of MicroStation. I mean such as Bentley Architecture, Bentley Structure, Mechanical or something else.

Can we even make an algorithm which determines the Discipline and route us to the corresponding datasets without explicitly writing the variable in each application's config files? Any help on this would be of great help to me.

Sincerely,

Rabi

Parents
  • For mechanical, try:    %if exists($(HVACDIR_PROGRAM))

    HVACDIR_PROGRAM only loads with BBMS (by default, unless you force it to load in your config)

    For electrical, try:        %if exists($(BBES_DATASETNAME))

    BBES_DATASETNAME only loads with BBES (by default, unless you force it to load in your config)

    for Structural, try:   %if exists $(STF_DATASETNAME)

    STF_DATASETNAME only loads with Bentley Structural (by default, unless you force it to load in your config)

    For Architecture, try: %if exists $(ATFDIR_MDLAPPS)

    ATFDIR_MDLAPPS only loads with Bentley Architecture

     

    I've done this for our office, and we did similar stuff at previous firms (for GEOPAK, InRoads, GeoGraphics, TranSoft, Axiom, etc.)

    You may also try %if defined....

    Plus, this will probably only work if you are running each app individually...if you are running the Suite (all together), I don't think this would work.

    HTH,

    Shawn

    Thanks,

    Shawn

    ------------

  • Personally, I think the %if defined option is idea. In our build I use a few of these to open up and add menus and so on depending on the app. A good example is Descartes. MS_DECSARTES is always defined if Descartes is installed on a users machine. So in our configs I use: '%if defined (MS_DESCARTES) \ %include $(HA_CADSITE)descartes/dcartes_2004.cfg \%endif'. This sets off a series of additions that then become available to people with Descartes on their machine. Pretty good stuff. (sorry about the syntax, still having issues with Chrome). Other applications have their own defined configs, BS sets STF_DATASETNAME as Shawn has posted so you could set up a line to do the same thing.



  • What are the diferent values of the _USTN_ECAPPL?

    I had someone say this before but for the life of me couldnt fingure it out.

    EDITED: OK found what it means I think.. 

    So you mean:

    %if defined  _USTN_ECAPPL = $(_USTN_TFROOT)triforma\Architecture\config\appl\

    (add new configs)

    %if defined _USTN_ECAPPL = $(_USTN_TFROOT)triforma\Structure\config\appl\

    ...etc.

    (PS. forgive incorrect structural path I just made it up as I dont have Structure loaded here)

    Could be tricky if you had Hvac, Struct and Arch all loaded at once.

     

     

  • Yes, that's the idea.  As far as loading the building suite... good question!  It may be possible to use some type of "and" condition so that you can test for multipe results, but this is reaching the limits of what I know about workspace configuration...

    You may want to post something on the MicroStation forum along those lines; i.e., testing for the existing of multiple results.



  • Steve,

    The "_USTN_ECAPPL" if used with "%if defined (_USTN_ECAPPL) == $(_USTN_TFROOT)triforma/Architecture/config/appl/

    " looks for a constant where as $(_USTN_TFROOT) is a variable. Could you try something and let me know. I want a sure shot tool to determine the application in the configuration. Please let me know.

     I tried other options suggested below but I still am looking for something which is in-built into the system.

    Regards,

    Rabi

  • Damon,

     Did it work for you? The _USTN_ECAPPL method didn't help me.

    Rabi

Reply Children