Hide last authors
Isak Björhag 10.1 1 (% class="box floatinginfobox" %)
2 (((
Isak Björhag 38.1 3 [[FEM-Design API examples on GitHub>>https://github.com/strusoft/femdesign-api-example]]
Isak Björhag 35.1 4
Isak Björhag 36.1 5
Iwona Budny Bjergø 39.1 6 Contents
IwonaBudny 2.1 7
Iwona Budny Bjergø 24.1 8 {{toc depth="3"/}}
Isak Björhag 10.1 9 )))
Isak Björhag 11.1 10
Iwona Budny Bjergø 39.1 11 More in this chapter:
IwonaBudny 2.1 12
13 * [[Run script>>doc:FEM-Design API.Run script.WebHome]]
14 * [[Modifying an XML file using Python>>doc:FEM-Design API.Optimization using Python script.WebHome]]
Iwona Budny Bjergø 44.1 15 * [[API wrapper>>doc:FEM-Design API.API wrapper.WebHome]]
16 * [[Dynamo API>>doc:FEM-Design API.Dynamo API.WebHome]]
IwonaBudny 2.1 17
18 ----
19
Iwona Budny Bjergø 24.1 20 = Introduction =
IwonaBudny 2.1 21
Iwona Budny Bjergø 24.1 22
23 (% style="text-align: justify;" %)
Isak Björhag 4.2 24 This is an introduction to the FEM-Design API functionality. The program is accessed by different XML files which can be generated from scratch, modified or used as a template. This can be done in many different ways and with many different programming languages. This makes the API functionality in FEM-Design very versatile. The following examples on this wiki is done in python but the same work flow can be used together with VB, C++ or other common languages.
IwonaBudny 2.1 25
Iwona Budny Bjergø 24.1 26
Isak Björhag 23.1 27 {{video ratio="16:9" url="https://youtu.be/A4NZuiVovQg" height="200" width="50"/}}
Isak Björhag 4.2 28
29
Iwona Budny Bjergø 28.1 30
31 (% style="text-align: justify;" %)
Isak Björhag 45.1 32 XML is a common markup language that is used to store and transport data. The file format uses different elements in a hierarchy, much like HTML. The different elements is found inside the tag for example <entities>. The element can have other elements below it in the hierarchy. These elements further describes the content of the element. For example the ##<bar>## element contains ##<bar_part>## which in turn contains the ##<curve>## element which defines the geometry of the bar. The start of the element is defined with the name between tags: ##<bar>##. The end of the element is defined with a slash in front of the name:## </bar>##
Isak Björhag 5.2 33
Iwona Budny Bjergø 24.1 34 (% style="text-align: justify;" %)
Iwona Budny Bjergø 26.1 35 The top element is called the root element, in the example below it is the ##<database>## element (marked in red). The elements below the database element is called child elements, for example the ##<entities>## element (marked in green). The ##<bar>## element (marked in blue) is a child to ##<entities>## and thus a grand child to the ##<database>## element, and so on.
Iwona Budny Bjergø 24.1 36
37
Isak Björhag 43.1 38 [[image:1557223235184-585.png||height="271" width="1200"]]
Isak Björhag 4.2 39
40
Iwona Budny Bjergø 24.1 41 (% style="text-align: justify;" %)
Isak Björhag 33.1 42 An element can have an attribute. This information is found inside the tag, an example of this is marked in red in the picture below. It can also have a text value which is found between the tags, marked in yellow.
Isak Björhag 5.2 43
Iwona Budny Bjergø 24.1 44
Isak Björhag 43.1 45 [[image:1557224680285-333.png||height="158" width="800"]]
Isak Björhag 5.2 46
47
Iwona Budny Bjergø 30.1 48 There are two different types of XML files in FEM-Design: struxml and fdscript.
49
Iwona Budny Bjergø 24.1 50 (% style="text-align: justify;" %)
Iwona Budny Bjergø 30.1 51 == StruXML ==
Isak Björhag 7.1 52
Iwona Budny Bjergø 30.1 53
Iwona Budny Bjergø 31.1 54 |=(% style="background-color: rgb(29, 89, 152); width: 261px;" %)(((
55 (% style="color:#ffffff" %)Latest version
56 )))|=(% style="background-color: rgb(29, 89, 152); width: 1216px;" %)(((
57 (% style="color:#ffffff" %)January 2019
58 )))
59 |(% style="width:261px" %)StruXML Schema|(% style="width:1216px" %)[[⭳ **Download **>>https://drive.google.com/file/d/1tvHaijL-5PrE6HuR4r6YjKcREs6YZcc5/view?usp=sharing]]
Iwona Budny Bjergø 30.1 60
Iwona Budny Bjergø 24.1 61 (% style="text-align: justify;" %)
Iwona Budny Bjergø 30.1 62 Struxml contains the objects and loads of the model. FEM-Design is able to both read and export models to struxml file format. Go to "File/Save as..." and choose struxml as the format. Go to "File/Open" to open the struxml file or just drag it into the FEM-Design window. StruXML is also the format used in exchange models between Revit / Tekla and FEM-Design.
Isak Björhag 7.1 63
Isak Björhag 8.1 64
Iwona Budny Bjergø 30.1 65 (% style="text-align: justify;" %)
66 == Fdscript ==
67
68
69 (% style="text-align: justify;" %)
70 Fdscript is used to execute different types of calculations and to export results. For more information about the script function, please visit the [[wiki page.>>doc:FEM-Design API.Run script.WebHome]]
71
72
73 ----
74
Iwona Budny Bjergø 24.1 75 = Customer cases =
Isak Björhag 9.1 76
Iwona Budny Bjergø 24.1 77
Isak Björhag 15.1 78 Did you use the API functionality in your project? Please contact us with feedback and you may also be featured on the wiki!
79
Isak Björhag 9.1 80
Isak Björhag 43.1 81 == Bridge geometry - Norconsult AS ==
Iwona Budny Bjergø 24.1 82
83 (% style="text-align: justify;" %)
Isak Björhag 34.1 84 The bridge is modeled with shell elements and the geometry is very complex with different thickness and angles of the shells. This is almost impossible to modell by hand so instead it is generated with the API. The geometry is defined as a nodal list with different thicknesses.
Isak Björhag 14.1 85
Iwona Budny Bjergø 24.1 86
Isak Björhag 43.1 87 [[image:1557491889197-384.png||height="594" width="800"]]
Isak Björhag 14.1 88
Isak Björhag 43.1 89 [[image:1557491914708-988.png||height="423" width="1000"]]
Isak Björhag 14.1 90
Iwona Budny Bjergø 24.1 91 (% style="text-align: justify;" %)
92 Customer: Norconsult AS
Iwona Budny Bjergø 41.1 93
94 ----
95
Iwona Budny Bjergø 42.1 96 (% style="text-align: justify;" %)
97 (% class="small" %)Disclaimer: All example files, wrappers and documentation are for illustrative and educational purposes and may not interact with FEM-Design in a reliable way depending on your version, installation and content of the files. Furthermore, StruSoft won´t guarantee full support of the API functions since they are customizable by the customer.
Copyright 2020 StruSoft AB
FEM-Design Wiki