forked from dlubal-software/RSTAB_Python_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_SectionDialogue.py
More file actions
47 lines (35 loc) · 1.22 KB
/
Copy pathtest_SectionDialogue.py
File metadata and controls
47 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import sys
import os
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
from RSTAB.initModel import Model
from RSTAB.Tools.sectionDialogue import *
from RSTAB.BasicObjects.section import Section
from RSTAB.BasicObjects.material import Material
if Model.clientModel is None:
Model()
def test_section_dialogue():
Model.clientModel.service.delete_all()
Model.clientModel.service.begin_modification()
Material()
Section(1, "IPE 300")
Section(2, "HEA 200")
#Create a Section Favorite List
CreateSectionList("Favs_1")
CreateSectionList("Favs_2")
#Add Section to Favorite List
AddSectionToMySectionList("Favs_1", "IPE 300")
AddSectionToMySectionList("Favs_1", "HEA 200")
#Delete Section From Favorite List
DeleteSectionFromSectionList("Favs_1", "HEA 200")
#Get Section Favorite List
GetMySectionLists()
#Delete Section Favorite List
DeleteSectionList("Favs_2")
DeleteSectionList("Favs_1")
#Create Section from Rsection File
CreateSectionFromRsectionFile(3, os.path.dirname(__file__)+'\\src\\rsection_test.rsc')
Model.clientModel.service.finish_modification()