-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyr-BeamGrade.mcr
136 lines (101 loc) · 2.46 KB
/
Myr-BeamGrade.mcr
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#Version 8
#BeginDescription
Last Modified: OBOS
Sets all beams that don't have grades to C24
OR - 1.0 - 20.04.16 - Pilot Version
OR - 1.1 - 20.04.16 - Added sqeuence number for generation
#End
#Type O
#NumBeamsReq 0
#NumPointsGrip 0
#DxaOut 1
#ImplInsert 1
#FileState 1
#MajorVersion 1
#MinorVersion 1
#KeyWords
#BeginContents
/// <summary Lang=en>
/// Sets beam grade for empty beams
/// </summary>
/// <insert>
/// ElementFloor
/// </insert>
/// <remark Lang=en>
///
/// </remark>
/// <history>
/// OR - 1.0 - - Pilot version
/// OR - 1.1 - 20.04.16 - Added sqeuence number for generation
/// </hsitory>
PropInt sequenceForGeneration(0, 0, T("|Sequence number|"));
sequenceForGeneration.setDescription(T("|The sequence number is used to sort the list of tsls during the generation of the element.|"));
sequenceForGeneration.setCategory("Generation");
// Set the sequence for execution on generate construction.
_ThisInst.setSequenceNumber(sequenceForGeneration);
// Set properties if inserted with an execute key
String arSCatalogNames[] = TslInst().getListOfCatalogNames(scriptName());
if( arSCatalogNames.find(_kExecuteKey) != -1 )
{
setPropValuesFromCatalog(_kExecuteKey);
}
if( _bOnInsert )
{
if( insertCycleCount() > 1 )
{
eraseInstance();
return;
}
if( _kExecuteKey == "" || arSCatalogNames.find(_kExecuteKey) == -1 )
{
showDialog();
}
}
if( _bOnInsert ){
if( insertCycleCount() > 1 ){
eraseInstance();
return;
}
PrEntity ssE(T("Select a set of floor elements"), ElementRoof());
if( ssE.go() ){
_Element.append(ssE.elementSet());
}
_Map.setInt("ManualInserted", true);
return;
}
if(_bOnElementConstructed || _Map.getInt("ManualInserted"))
{
for (int e = 0; e < _Element.length(); e++) {
Element el = _Element[e];
Beam arBm[] = el.beam();
for (int b = 0; b < arBm.length(); b++) {
Beam bm = arBm[b];
if (bm.grade() == "")
{
bm.setGrade("C24");
}
}
}
eraseInstance();
return;
}
#End
#BeginThumbnail
#End
#BeginMapX
<?xml version="1.0" encoding="utf-16"?>
<Hsb_Map>
<lst nm="TslIDESettings">
<lst nm="HostSettings">
<dbl nm="PreviewTextHeight" ut="L" vl="1" />
</lst>
<lst nm="{E1BE2767-6E4B-4299-BBF2-FB3E14445A54}">
<lst nm="BreakPoints" />
</lst>
</lst>
<lst nm="TslInfo" />
<unit ut="L" uv="millimeter" />
<unit ut="A" uv="radian" />
</Hsb_Map>
#End