Skip to main content

How to use file_in and file_out value types for user-defined attributes

Tekla Structures - Not version-specific
Not version-specific
Tekla Structures
Environment
Not environment-specific

Question:
In the objects.inp what do file_in and file_out can do? How do you use it? Can I use this to automatically open let's say a pdf file? Or it just saves the path you browsed? Whats the difference between the two?

Answer:
Both of the fields are string attributes. They are saving the path to the file, and not actually opening the file. The file_in and file_out attributes create the actual field to show the path and additionally a three dot button, which is opening the basic browse window, where you can select the path and file.

Image
file_in_example.png


Same syntax is used in system components inp descriptions. Following descriptions are from our old macro programming manual:

file_in
Creates a file field and a select button. Checks the entered value.
One example of this UDA definition is in Australasian environment, where file_in is used in setting the path for RFI information:
unique_attribute("RFI_PATH", "Path:", file_in, "%s", no, none, "0.0", "0.0")   {    value("", 0)   }
Also usimp environment is having UDA definitions using file_in attribute. The Change Orders tab contains paths to the document locations set with file_in attribute.
unique_attribute("CO1_PATH", "Change Order 1 Path:", file_in, "%s", no, none, "0.0", "0.0",11)     {         value("", 0)     }

file_out
Creates the file field and a select button.
One example of this are the export components, like for example FEM export, where the name of the output file is set by using this definition:
   tab_page("","jd_Parameters",3)     {       attribute("filename", "j_output_file", file_out, "%s", none, none, "0.0", "0.0")       {         value("output.stp", 1)
Submit

Table of Contents