Quantcast
Channel: Bentley Communities
Viewing all articles
Browse latest Browse all 4605

Configuration - Use Variables in Key-ins to Quickly Open Folders or Files

$
0
0

For a long time we have been able to edit MicroStation cells by right-clicking and picking 'Open for Editing'. Editing other resources can involve repetitive navigation to locations in the Project/WorkSet or Workspace/Configuration. We have a couple of key-in structures that can help to avoid these repetitive steps.

1. Open a location in Windows Explorer

key-in: $ %explorer $(<variableName>)

  • '$' instructs that any subsequent configuration variables should be expanded
  • '$explorer' instructs open in Windows Explorer
  • '$(<variableName>)' specifies the path to the folder that should be opened. This could be a hard-coded path when used as a one-off key-in but must be a variable if used to drive a custom tool to avid errors when the hard-coded path is not present.

e..g.: $ %explorer $(_USTN_OUT)

2. Open a text file for editing in Notepad++

This is identical to the previous example except that '%notepad++' specifies Notepad++ as the target application to open the file.

e.g: $ %notepad++ $(_USTN_PROJECTCFG)

This example for V8i will open the Project Configuration File

The CONNECT Edition equivalent would be:

$ %notepad++ $(_USTN_WORKSETCFG)

3. Open a file in MicroStation

The syntax is similar but here the 'newfile' command is used to open the specified file in MicroStation (or the current MicroStation based application)

e.g.: $ newfile $(BB_GRID_TEMPLATE_DGNLIB)

Apply to Custom Tools

These key-ins can be appied to custom tools that can then be added to V8i Menus or Toolboxes or to the CONNECT Edition Ribbon:

Note that this example has a custom Named expression applied that hides the tool unless AECOsim Building Designer is the current application.


Viewing all articles
Browse latest Browse all 4605

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>