File Location Editor

Gio Siradze
Gio Siradze
  • Updated

Overview

Dataflows read and write files, and a dataflow that works on your computer should also work on a colleague's computer, on a server or in Simplebim Cloud, where the folders are different. That is why the file and folder settings of dataflow steps do not store bare paths. They store a file location, which is a named folder, plus the path inside it. Point the location at another folder and every setting that uses it follows, without touching the dataflow itself.

The File Locations dialog is where you see the file locations Simplebim knows about, add locations of your own, rename them, point them at folders on your computer and remove them again. The dialog always works on the locations of one context, and the context is named in the title. For a dataflow the title is ‘File Locations: dataflow’.

How a file or folder setting uses a location is covered in the Configuration Editor article, and what the file locations of a dataflow are for is covered in the Dataflow Palette article.

What a File Location Is

A file location is a named folder. Instead of storing ‘C:\Projects\Tower\Exports\model.ifc’, a file setting stores the location ‘Exports’ plus the file name ‘model.ifc’. Move the project, or open the same dataflow on another computer, and you only change where ‘Exports’ points.

Every location has four things:

  • Name: the name you see in the dialog and in the file location drop-downs of the steps. It is also how settings refer to the location, so two locations cannot have the same name.
  • Parent: either This PC, which means that the folder is an ordinary Windows path, or another location, which means that the folder is inside that location. Locations can be chained, for example ‘Exports’ inside ‘Project’ inside This PC.
  • Folder: the path. A full path under This PC, a path inside the parent under any other parent.
  • Scope: who owns the location and where it is visible, see Scopes.

Two locations are built in and behave specially.

This PC is the root of the local file system. It has no folder of its own, and a location under This PC holds a full Windows path.

Current is the folder of the model that is currently open or imported. Simplebim moves it whenever you open another model, so you cannot edit it, and while no model is open it has no folder.

Where You Meet the File Locations Dialog

You reach the dialog from two places, and both open it for the dataflow that is currently in the Dataflow palette.

File Locations on the toolbar of the Dataflow palette opens the dialog with no location selected. This is the place to go when you want to look at all the locations of the dataflow at once, for example right after opening a dataflow that came from somebody else.

The pencil button in the file location drop-down of a file or folder setting of a dataflow step opens the same dialog with the current location of the setting selected. When you close the dialog with OK the drop-down is refreshed and the location you had selected in the dialog becomes the location of the setting. This is the quick way to add a location and take it into use in one go.

Whichever way you opened the dialog, the file location drop-downs of all the steps follow your changes when you click OK, also in the steps that are expanded, and the steps stay as they are.

The same editor, without the dialog around it, is also on the File Locations tab of the Application Settings, where it manages the locations of your computer instead of the locations of a dataflow. See File Locations in Application Settings.

The Dialog at a Glance

From top to bottom the dialog has the following parts.

  1. Add, Copy and Delete: the + button above the list adds a new location, the copy button adds a copy of the selected location and the × button deletes the selected location. Hover the mouse over a button to see what it does.
  2. The list: one row per location that belongs to this context, see The List of Locations. Click a row to select it.
  3. Details: the Scope, Name and Folder of the selected location. For a location you may change, Name and Folder are edit boxes. For the other locations they are plain text.
  4. OK and Cancel: OK applies everything you did in the dialog, Cancel throws all of it away, and so does closing the dialog with Esc or its close button.

The list shows your changes as you make them. A changed name or folder turns blue, a deleted row turns red and struck through, and the Parent(s) column and the grey part of the Folder column follow when you pick another parent. Nothing is applied before you click OK, so you can always back out with Cancel.

The List of Locations

The list has the following columns, from left to right.

Icon A pencil when you can change the row and a lock when you cannot, see Which Locations You Can Change.
Scope Who owns the location: System, User or Dataflow, see Scopes.
Parent(s) The chain of locations this one is inside, ending in an arrow, for example ‘Project →’. Empty for a location directly under This PC.
Name The name of the location.
Folder The full folder the location points to, with the part that comes from the parent chain in grey and the location's own folder in black.

The list is sorted by Scope when the dialog opens. Click a column header to sort by that column instead.

Only the locations that are set up for dataflows are listed: This PC, Current, the User locations of your computer and the locations of the dataflow itself. The other built-in folders of Simplebim, for example the folder of the installed dataflows, are not used by dataflow steps and are not shown here.

Scopes

Locations live in three nested scopes, and each scope sees the scopes above it.

System The built-in locations that Simplebim creates at start-up: This PC, Current and the folders of the installed and saved dataflows and templates. Visible everywhere.
User Locations set up on this computer for you and kept in your application settings. Visible in every dataflow.
Dataflow Locations that belong to the current dataflow and are saved in its file, together with the folder each one points to on this computer. Visible only while that dataflow is open.

The dialog edits one scope at a time, the scope of its context. For ‘File Locations: dataflow’ that is the Dataflow scope. The System and User locations are listed too, so that you can see them and use them as parents, but they are locked. User locations are edited in the Application Settings, see File Locations in Application Settings.

The locations of a dataflow come from several sources. When you open a dataflow, the locations saved in its file come with it. When you add a step from a saved or shared dataflow that uses file locations, the locations of that step are added to your dataflow, unless a location with the same name is already there. And you can add locations yourself with the + button. A location that was made on another computer, or that came from a shared, exported or imported dataflow file, arrives without a folder, and this dialog is where you point it at a folder on your own computer.

The Parent(s) Column

A location whose folder is inside another location shows the name of that location here, and when that one has a parent too, the whole chain from the outermost location inwards, for example ‘Project → Phase 2 →’. The chain is read from the list as it is right now, so renaming a parent updates the chain of its children on the spot, and the changed chain turns blue.

The Folder Column

The column shows the full folder the location points to right now: the part that comes from the parent chain in grey, and the location's own folder in black, or in blue once you have changed it. Change the folder of a parent and the grey part of every location under it changes with it.

The two built-in locations are special. This PC shows ‘<The root of the local file system>’, and Current shows the folder of the open model, or ‘<The folder of the currently opened/imported model>’ while no model is open.

A location that has not been pointed at a folder yet has an empty Folder cell.

Which Locations You Can Change

A row gets a pencil when at least its name or its folder can be changed, and a lock otherwise. The rules are simple.

  • The System locations never change their name, and This PC and Current cannot change their folder either, because Simplebim maintains them.
  • Locations of another scope than the one the dialog edits are locked. In ‘File Locations: dataflow’ that means every System and User location.
  • Locations of the edited scope can be renamed, pointed at another folder and deleted.

So in ‘File Locations: dataflow’ the rows with a pencil are the dataflow's own locations, and only those.

Editing a Location

Click a row and its details appear below the list. For a location you can change, Name and Folder are edit boxes, and what you type is shown in the list immediately. Scope is always plain text.

Name

Type the new name in the Name box. The Name cell of the row follows as you type and turns blue when it differs from the name the location had when the dialog opened. Spaces at the beginning and at the end are ignored, and names are compared without regard to capitalisation, so ‘exports’ and ‘Exports’ are the same name.

Two kinds of names are not accepted. When you click OK with such a name, a message names the problem and the dialog stays open so that you can change the name:

  • a name that is already in use by another location, including a location that is not shown in this dialog, for example one of the built-in folders. The key of a built-in location, for example ‘current’, counts as well;
  • a name that contains ‘://’.

An existing location cannot be left without a name either. A new location without a name is simply dropped, see Adding a Location.

Settings refer to a location by its name, so renaming a location has consequences beyond the dialog, see Renaming and What It Changes.

Parent Location and Folder

The Folder row has two parts: a drop-down with the parent location on the left and the folder box on the right.

The parent drop-down tells where the folder is. This PC means that the folder box holds a full path. Any other location means that the folder box holds a path inside that location, and the grey part of the Folder column shows what that location contributes. The drop-down offers the other locations of this context, except the location you are editing and except locations of a narrower scope than the one you are editing, because a location cannot depend on one that will not be there when it is used. The drop-down does not stop you from picking a location that is itself inside the one you are editing, so take care not to go round in circles.

Picking a parent updates the Parent(s) column and the grey part of the Folder column straight away, but it does not change the folder box. When you switch from This PC to another location, replace the full path with the path inside that location, or browse again.

The folder box holds the path. Type it, or use the … button on its right to browse for it.

Browse and Reset

The … button opens the Windows folder browser. For a location inside another location the browser starts at the folder the location currently points to, or at the deepest part of that path that exists on this computer. Pick a folder and click OK. When the parent is another location and the folder you picked lies inside it, only the part inside is stored, and the grey part of the Folder column shows the rest. Otherwise the full path is stored.

A Reset button appears next to the folder box for a location that has a default folder, and it puts that default back into the folder box. The locations of a dataflow have no default folder, so you meet Reset in the Application Settings, for the User Dataflows and User Templates folders.

Adding a Location

Click the + button above the list. A new row appears in the list and is selected, with the scope of the dialog, an empty name and an empty folder under This PC. Type the Name, pick another parent location in the drop-down when the folder is inside one, and type or browse the Folder. The folder may stay empty when you only want to add the name now and point it at a folder later, for example when you are preparing a dataflow for another computer.

A new row that still has no name when you click OK is simply dropped, so a row added by mistake does no harm. Leave it empty or delete it.

A location added in ‘File Locations: dataflow’ is a Dataflow location. It is saved with the dataflow and listed in the file location drop-downs of its steps. A location you want to use in every dataflow is added in the Application Settings instead.

Copying a Location

Select a row and click the copy button above the list. A new row appears and is selected, in the scope the dialog edits, with the same parent and folder as the selected location and its name followed by ‘(copy)’, or ‘(copy 2)’, ‘(copy 3)’ and so on when that name is already taken. Change the name or the folder as you need. In every other respect the copy is a new location, see Adding a Location.

The copy button is enabled for a location of the scope the dialog edits, and disabled for a deleted row and wherever the + button is disabled.

Deleting a Location

Select a row and click the × button above the list. The row turns red and struck through. The location is removed when you click OK, and Cancel brings it back.

The × button is disabled when the selected location cannot be deleted:

  • a System location;
  • a location of another scope than the one the dialog edits;
  • a location that is the parent of another location in the list. Point the other location elsewhere, or delete it first.

The name of a deleted location is free again at once, so a new or renamed location may take it in the same session.

Deleting a location does not delete any folder or file. It only removes the name.

When you click OK, every file and folder setting of every step of the dataflow that used the deleted location moves to This PC with the full path. The folder of the deleted location is put in front of the file name, so the setting keeps pointing at the same file. For example, when the location points at C:\temp and the setting holds x.ifc, the setting becomes This PC with C:\temp\x.ifc. A list of files moves name by name, and a folder setting gets the folder itself. This reaches the same settings as a rename, see Renaming and What It Changes. A location that has no folder on this computer stays in the setting by its name and is shown in red, see Troubleshooting.

Renaming and What It Changes

Settings refer to a location by its name, so to them a renamed location is a different location. Simplebim takes care of the consequences when you click OK.

Inside the dialog, every location of the edited scope that was inside the renamed location now refers to the new name. Renames are applied together, not one by one, so when two locations swap names, or a rename chains through several rows, all of them end up right.

Outside the dialog, every file and folder setting of every step of the dataflow that used the old name is switched to the new name, no matter whether you opened the dialog from the toolbar of the Dataflow palette or from the drop-down of a setting. When the dialog was opened from a setting, that setting also keeps the location selected under its new name.

Renaming does not move any files. It changes what the name stands for, not what is on disk.

Keeping or Discarding Your Changes

Nothing you do in the dialog is applied until you click OK.

OK first checks the names, see Name. Then it applies the renames, then the changed folders, the added locations and the deleted locations, and hands the result to the dataflow. The dataflow is marked as changed, whether you opened the dialog from the toolbar of the Dataflow palette or from a setting of a step, and the locations and the folders they point to are saved in the dataflow file, so save the dataflow to keep your changes.

Cancel discards everything, including deletions. The locations are exactly as they were when the dialog opened. Closing the dialog with Esc, its close button or Alt+F4 does the same as Cancel.

There is no undo inside the dialog. To take back one change, retype the old name or folder before clicking OK, or cancel and start over.

File Locations in Application Settings

The same editor is on the File Locations tab of the Application Settings, which you open from Settings in the application menu at the left end of the ribbon. There it works on the locations of your computer instead of the locations of a dataflow.

The list shows the built-in System folders of Simplebim, for example Installed Dataflows, User Dataflows and the template folders, together with This PC, Current and your own User locations. The System folders keep their names, but you can point ‘User Dataflows’ and ‘User Templates (Legacy)’ at a folder of your choice, and the Reset button puts the default folder back. Your User locations you add, rename, point at folders and delete just like the locations of a dataflow.

A User location is available in every dataflow. In ‘File Locations: dataflow’ it is listed as a locked User row, you can pick it in the file location drop-down of any step, and you can use it as the parent of a Dataflow location. The changes are stored in your application settings when you click OK in the Application Settings dialog. The names are checked first, as in the File Locations dialog, and a message about a name brings the File Locations tab to the front.

Troubleshooting

Every row has a lock and I cannot edit anything.
Only the locations of the dialog's own scope are editable. In ‘File Locations: dataflow’ those are the dataflow's own locations, and a new dataflow has none yet. Click + to add one. User locations are edited in the Application Settings.

A location has an empty folder.
The dataflow came from another computer or from a shared dataflow file, and the location has not been pointed at a folder on this computer yet. Select the row and type or browse the folder.

OK shows a message about a name.
The name is already in use by another location, possibly one that is not shown in this dialog, or it contains ‘://’, or an existing location has no name. The dialog stays open: change the name and click OK again.

The × button is greyed out.
The selected location is a System location, belongs to another scope, or is the parent of another location in the list. Point the other location elsewhere first, then delete.

The folder looks shorter than the one I browsed to.
The parent is another location and the folder you picked lies inside it, so only the part inside is stored. The grey part of the Folder column shows the rest, and together they are the full path.

I picked a parent and the folder became wrong.
The folder box is not changed when you pick a parent, so a full path typed under This PC is now read as a path inside the new parent. Edit the folder box or browse again.

The location I want as a parent is not in the drop-down.
A location cannot be its own parent, and it cannot depend on a location of a narrower scope than its own. Locations that are not set up for dataflows are not offered either.

The folder browser opened somewhere unexpected.
For a location inside another location the browser starts at the folder the location currently points to, or at the deepest part of that path that exists on this computer. For a location directly under This PC, and for a parent that points nowhere yet, the browser starts where Windows puts it.

A step shows a location name in red.
The setting refers to a location that does not exist in this dataflow, for example because a location that had no folder on this computer was deleted, or because the dataflow file was edited by hand. Pick a location in the drop-down of the setting, or add a location with that name.

Current shows no folder.
No model is open. Current follows the model, so open or import one and it points at the folder of that model.

Release Notes

Simplebim 12.0 SR2

  • The new copy button above the list adds a copy of the selected location, named after it with ‘(copy)’.
  • Closing the dialog with Esc, its close button or Alt+F4 now discards the changes, like Cancel. Earlier, it applied them like OK.
  • The names are checked when you click OK. A name that is in use, a name that contains ‘://’ and an existing location without a name give a message, and the dialog stays open. Earlier, such a rename was put back to the old name without a word.
  • When a location is deleted, the file and folder settings that used it move to This PC with the full path, so they keep pointing at the same files. Earlier, they kept the name of the deleted location.
  • The file location drop-downs of all expanded steps follow the changes made in the dialog. Earlier, they kept listing the old locations until the step was collapsed and expanded again, and a rename of a location that a step used collapsed every expanded step.
  • In the Application Settings the editor is on the File Locations tab, and the names are checked before the dialog closes.
  • While the list is sorted, a row is no longer set up from another row of the list.

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.