How to edit the INP file (basic)

Items covered

1. Adding pictures

2. Moving input parameter position

3. Adding a new tab

 

Situation

More information

Change the default automatically created dialog to suit the users requirements

 

 

 

After creating a custom component (connection, detail, part) a dialog is automatically created.

 

 

This dialog is controlled by an INP file automatically generated in the model directory

This can easily be accessed through the “Tools” menu. This file can then be edited using a normal text editor such as “Notepad” or “Wordpad

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The file will look like this:

This can now be edited to suit the user requirements.

 

First step would be to use “Paint” to create a picture.

This should be saved in the teklastructures\”version”\nt\bitmaps directory

 

 

      Hint: use an existing bitmap as a base picture

      NOTE!!! the picture must be saved as a bitmap           

 

 

 

 

 

 

 

The following line can then be added to the INP file

 

picture ("sbkl", 470, 260, 70, 20)

 

 

 

 

 

 

                               “Picture Name”            “Picture Size”         “Picture Position X, Y”                     

 

Save the INP file.

 

To see the changes re-open the model and double click on the custom object to open the dialog  

 

 

Note!: The picture is behind the text

Note!: To see any changes to the picture done in paint you will have to restart Tekla Structures

 

 

 

 

 

 

 

 

We now have the picture in the dialog, now we need to re position the input parameters.

Re open the INP file and edit the first parameter (In this example “H”)

 

parameter("H", "P1", distance, number, 1)

 

Edit to:

 

parameter("", "P1", distance, number, 610,10,50)

 

 

 

                  Remove Parameter Name                          Add coordinates    X        Y    Length

 

 

      Hint: The X, Y coordinates are found using trial and error 

      The length in metric should not be less than 70 in imperial at least 100 is recommended

      If you wish to keep the parameter name the X co-ordinate should be set to 370        

 

 

 

 

 

 

 

 

 

Save the INP file.

 

To see the changes re-open the model and double click on the custom object to open the dialog   

 

 

We can now repeat for the all the other parameters:

 

page("Xsteel","")

{

   joint(1, "SBKL")

   {

       tab_page("", " Parameters 1 ", 1)

       {

           picture("sbkl", 470, 260, 70, 20)

           parameter("", "P1", distance, number, 610,10,70)

           parameter("", "P2", distance, number, 250,10,70)

           parameter("", "P3", distance, number, 30,160,70)

           parameter("", "P4", distance, number, 250,290,70)

           parameter("", "P5", distance, number, 440,160,70)

           parameter("FII2", "P8", profile, text, 370,400,100)

           parameter("FII3", "P9", profile, text, 370,430,100)

           parameter("Reference", "P11", string, text, 370,460,100)

           parameter("Plate Grade", "P12", material, text, 370,490,100)

           parameter("Anchor Grade", "P13", material, text, 370,520,100)

           parameter("", "P15", distance, number, 500,10,70)

           parameter("FII", "P16", distance, number, 370,550,100)

       }

   }

}

 

Save the INP file.

 

To see the changes re-open the model and double click on the custom object to open the dialog   

 

 

We can now change the “Tab” name and move these other items to a new “Tab”

 

page("Xsteel","")

{

   joint(1, "SBKL")                     Tab Names

   {

       tab_page("", " Misc ", 1)

       {

           picture("sbkl", 470, 260, 70, 20)

           parameter("", "P1", distance, number, 610,10,70)

           parameter("", "P2", distance, number, 250,10,70)

           parameter("", "P3", distance, number, 30,160,70)

           parameter("", "P4", distance, number, 250,290,70)

           parameter("", "P5", distance, number, 440,160,70)

           parameter("", "P15", distance, number, 500,10,70)

       }

       tab_page("", " Material ", 2)

       {

           parameter("FII2", "P8", profile, text, 1)

           parameter("FII3", "P9", profile, text, 2)

           parameter("Reference", "P11", string, text, 3)

           parameter("Plate Grade", "P12", material, text, 4)

           parameter("Anchor Grade", "P13", material, text, 5)

           parameter("FII", "P16", distance, number, 6)

       }

   }

}

 

As no picture is used on the 2nd tab we don’t need X, Y coordinates for the text items only row numbers