Show last authors
1 (% class="box floatinginfobox" %)
2 (((
3 [[FEM-Design API examples on GitHub>>https://github.com/strusoft/femdesign-api-example]]
4
5
6 Contents
7
8 {{toc depth="3"/}}
9 )))
10
11 More in this chapter:
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]]
15 * [[API wrapper>>doc:FEM-Design API.API wrapper.WebHome]]
16 * [[Dynamo API>>doc:FEM-Design API.Dynamo API.WebHome]]
17
18 ----
19
20 = Introduction =
21
22
23 (% style="text-align: justify;" %)
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.
25
26
27 {{video ratio="16:9" url="https://youtu.be/A4NZuiVovQg" height="200" width="50"/}}
28
29
30
31 (% style="text-align: justify;" %)
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>##
33
34 (% style="text-align: justify;" %)
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.
36
37
38 [[image:1557223235184-585.png||height="271" width="1200"]]
39
40
41 (% style="text-align: justify;" %)
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.
43
44
45 [[image:1557224680285-333.png||height="158" width="800"]]
46
47
48 There are two different types of XML files in FEM-Design: struxml and fdscript.
49
50 (% style="text-align: justify;" %)
51 == StruXML ==
52
53
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]]
60
61 (% style="text-align: justify;" %)
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.
63
64
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
75 = Customer cases =
76
77
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
80
81 == Bridge geometry - Norconsult AS ==
82
83 (% style="text-align: justify;" %)
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.
85
86
87 [[image:1557491889197-384.png||height="594" width="800"]]
88
89 [[image:1557491914708-988.png||height="423" width="1000"]]
90
91 (% style="text-align: justify;" %)
92 Customer: Norconsult AS
93
94 ----
95
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