A file block is a block that references an external file. The different types of file blocks model quite different types of problems, and use different parameters, but they also share some common properties which are described below.
Using the Block Properties - General dialog box, the contents of a file block can be changed in two ways:
Another file can be browsed by pressing the Browse... button.
The referenced file of most file blocks can be modified inside CST DESIGN STUDIO™ by pressing the Edit... button. This launches an appropriate editor, e.g. a CST MICROWAVE STUDIO File block will be opened in CST MICROWAVE STUDIO® and a SPICE Import block in a simple editor window.
After a browse or edit operation the block will be updated with the new or changed file. Frequency bounds (if present) and the number of internal ports will be changed according to the new contents. Connections will be kept if there are some ports with identical names contained in the new or changed project.
After dropping a file block inside the schematic view, an Import File dialog box is opened (see below). There, you may browse for a file of the correct type (block specific file extensions are preset in the dialog).
Apart from block specific properties there is one property common for all file blocks that can be set while inserting the block, but that can also be modified later by customizing the block’s property dialog:
’Store Relative Path’:
You can either store the relative path or the absolute path from the current
CST DESIGN STUDIO™ project to the selected file. This option is
disabled if the CST DESIGN STUDIO™ project has not yet been saved
(as there is no path for this project at all). Then, the absolute path
will be automatically stored. Both options make sense, depending on how
you wish to deal with the project in future. If there is a project repository
on a server it is useful to provide absolute paths because you just need
to send the CST DESIGN STUDIO™ project file to a colleague who may
also access the server. On the other hand, if you want to send a project
file to someone who cannot access the server, perhaps by e-mail, it is
more useful to copy the referenced file to a sub-folder of the current
project’s folder and provide the relative path. You can quickly
modify this property for all blocks of your model by selecting all blocks
and choosing Home:
Edit Project
Dependencies Set
Relative Paths... . Then the Set
Relative Paths dialog box is opened that displays a list of all blocks
referring to a file.
Each entry is associated with a check box indicating whether or not
a relative path is considered for this. By choosing Home:
Edit Project
Dependencies Set Default
Relative Path you can switch on or off the consideration of a relative
path as default for blocks that will be inserted afterwards.
A file block is represented by a block specific image (e. g. a small image of the 3D model in case of a CST MICROWAVE Studio file block) and a small arrow on the lower left indicating that it is a file block. The number of internal ports is derived from the referenced file, e.g. in case of a CST MICROWAVE Studio file block it corresponds to the number of (waveguide or discrete) ports defined in the CST MICROWAVE STUDIO® model, and in case of a SPICE Import block it corresponds to the number of terminals of the selected subcircuit.
For file blocks referencing a CST STUDIO SUITE® project, results will be automatically calculated during the execution of a task if no results are available or existing results are outdated.
If a file is modified in an external program, e.g. in an external instance of CST MICROWAVE STUDIO®, CST DESIGN STUDIO™ recognizes this change. The file blocks store the modification times of their associated files. Before an update of the results is performed, these modification times are compared with the files’ current modification times. If they differ, the Update File References dialog will be displayed, containing a list of the modified files. Please mark those files that need to be updated in the CST DESIGN STUDIO™ model. All other results will be kept.
Both choices can make sense: Imagine that you open a CST DESIGN STUDIO™ project that you have not used for some time and in the meantime have modified an external file that is referenced from within the program. If you do not intend to change the CST DESIGN STUDIO™ project, you should choose not to update the blocks associated with this file. On the other hand, if you are just working with both programs in parallel and always want to accept the modifications performed in CST MICROWAVE STUDIO® in CST DESIGN STUDIO™, then you would choose the update of the associated file.
You may check whether all file references of a CST DESIGN STUDIO™ project are valid by choosing Home: Edit Project Dependencies Check For Missing Files from the main menu. A dialog will be shown that lists all missing files and indicates whether they can be restored automatically or not. You have two options for fixing missing file references:
Manually: Simply browse for
the file again just as you would browse for a different project, as explained
above.
Automatically: File blocks store a copy of the referenced project in a local repository inside the CST DESIGN STUDIO™ project. If the original file is not available, e.g. if it has been deleted or you received the CST DESIGN STUDIO™ project without references by email, it will be restored using this copy during the execution of a task. The restored project will be placed into a numbered folder next to the CST DESIGN STUDIO™ project, and the file block will be updated with the new file name. The local repository stores always the newest version of a referenced project, regardless whether the file block is up to date or not.
See also