Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Future consideration
Categories General
Created by Guest
Created on Feb 12, 2024

Configuration Variable -> Random Number

Hello Bentley, there are times when we need random numbers, or unique numbers in the session, or from the Windows environment.

There are a couple of ways to do this for example to generate an integer from Windows %Random command and pass it to a variable, to the more complex randomly generated Globally Unique Identifier (GUID) for the session which is stored as a variable.

If we went down the path of GUID then to pair the GUID to the system, it can be strung together with the Universally Unique Identifier (UUID) for the system.

Random numbers would be good for session ID for scripts or to insert as ID for CAD files or with configured environments to filter end users.

Sometimes we would like a random number generated in configuration the same way we do for VBA scripts.

The same random GUID in configuration could be used in VBA, in the CAD file, in a project or when creating DGNlib's.

  • Admin
    Stuart Milne
    Reply
    |
    Feb 13, 2024

    Hi Robert.


    Could you provide examples where you would use this, and why it's important? Perhaps this will help others relate to the problem you are trying to solve and give it an up vote.

    Stuart

    4 replies