Wednesday, 30 August 2017

Tips & Tricks: Import model data from Excel into ConSteel, using the "Excel command package" of csPI

csPI contains a bunch of commands to deal with Excel files. With the use of these commands, you are able to write your very own, customized script, to handle data stored in Excel, no matter what the source of the data is.

In the video below the steps of coding of an import script is shown, based on an Excel file, containing the model data.
If you want to check out the code in action for yourself, you can download the Excel and the csPI file from these links:
Click to download: Excel file of the video
Click to download: csPI script of the video

In the video the Excel file only contains the start, end point coordinates and ID's of the members. Based on the idea of this script, of course all kind of member parameters can be imported into ConSteel with csPI, like member parameters (release conditions, eccentricities etc.), sections, materials, load groups, load cases, loadings, supports and more. 

If there are more worksheets for different types of data in an Excel file (eg. coordinates, loadgroups, supports), it can be handled too with the "Name of worksheet" Command parameter of the EXCEL_READ_CELL command.

For more features of csPI, visit our Wikipedia page, and check out our  Youtube channel!
Watch out for more Tips&Tricks coming soon!

Wednesday, 23 August 2017

Tips & Tricks: General principles of the Create command in csPI

With the create command, different kind of objects can be created in the model. The syntax of the command is consequent, but depending on the object to be created, it slightly different.

There are 2 kind of objects distinguished in csPI what can be created with the Create command, conventional, and unconventional objects. The syntax is pretty much the same, and looks like the following:


The difference, is that the unconventional objects requires Additional attributes beyond it's command parameters (ID, object type) when it is created.

The Command parameters - always required:

[COMMAND] - Create in this case
[ID OF OBJECT] - Used to select/reference the object later, by this ID (placing a support on a member with a known ID)
[OBJECT TYPE] - This is the type of the object which is desired to be created (point_support) All of the object types are listed on
[ADDITIONAL ATTRIBUTE] - Works like additional input parameters for the object creation. Only necessary in case of unconventional objects.

The object attributes - required/optional:

[OBJECT ATTRIBUTE] - A reference to a property of the object which is desired to be defined. Some object attribute is required (start-end coordinates of a member) some are optional, and will have a default value if not defined (eccentricities are 0 by default)
[OBJECT ATTRIBUTE VALUE] - Value of the object attribute itself. Must be given between quotation marks if it is a textural value (release condition) 

Example in case of a a Structural member (not all object attributes are set):
CREATE "ID1" Structural_Member "HEA 200"
0 0 0
0 0 3000
ReleaseID_A "Continuous"
ReleaseID_B "yy,zz"
Eccentricity_Y 100

Result after execution:

The following objects can be created with the Create command through csPI right now, in ConSteel 11 SP1, all of them are listed in details on with sample codes:

  • Structural member 
  • Structural plate
  • Tapered member
  • Link element
  • Point support
  • Line support
  • Loadgroup
  • Loadcase
  • Load transfer surface
  • Point load
  • Line load
  • Surface load

Tuesday, 15 August 2017

Tips & Tricks: Variables in csPI - ConSteel Programming Interface

Variables are one of the the key points when it comes to parametric model building, besides cycles and if-else statements.

Variables in csPI can store either numerical or text values. 
Numerical variables are usually used to store input parameters for objects, like coordinates of a structural member, thickness of a plate etc. 
Text variables are usually used to store releases, section names, material names and so on.

Either way, there are some principles to follow when defining a variable:
  • Every variable definition has to be started with a $ sign
  • The $ sign is followed by the name of the variable, which can be referenced later in your code and it can contain numerical and text characters too
  • An equation sign (=) is needed between the name definition and value definition
  • Value definition after the equation sign
    • numerical variable: direct input of numbers or predefined numerical variables  ($x=$y+$z)
    • numerical variable: accepted sign for decimals is the dot "."
    • numerical variable: mathematical operators can be used in value definition
    • text variable: values of text variables has to be defined between apostrophes

For more features of csPI, visit our Wikipedia page, and check out our Youtube channel!
Watch out for more Tips&Tricks coming soon!

Tuesday, 1 August 2017

Tips & Tricks: Functionalities of the csPI editor

The csPI editor is the place where all of the programming interface related functionalities are placed.

By default when ConSteel is started, the editor appears in a Minimized size, with reduced  number of functionalities:

  • If there is a previously created .cspi script file, and there is no need to edit it, the panel is not even necessary to be opened. By clicking on the Load button, the script can be loaded for execution.
  • Loaded .cspi script file can be executed with the run button

  • Editor size can be maximized with the Open/Close button, and model writing can be started

After the size of the editor is maximized, more features are available. 
Code writing or code editing takes place in the code input area. Beyond displaying/coloring the written code, this input area has some more good-to-know features, like:
  • Input of sample codes

  • Right click on a command redirects to the fully detailed description of it, to our Wikipedia page

With maximized editor size, using click&drag technique on the heading of the editor, it can be moved and docked anywhere on the screen. This function can come in handy if there is a secondary monitor is in use:
The editor can be docked back to it's original place, by simply dragging it back to the bottow of ConSteel's window.

For more features of csPI, visit our Wikipedia page, and check out our Youtube channel!
Watch out for more Tips&Tricks coming soon!