ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/RCProp.vb
Revision: 130
Committed: Wed Jul 30 21:26:03 2008 UTC (16 years, 9 months ago) by bournival
File size: 24336 byte(s)
Log Message:
Une mise à jour, car on aura peut-être besoin de mon code.

File Contents

# Content
1 Imports SolidWorks.Interop
2 Imports SolidWorks.Interop.swconst
3 Imports SolidWorks.Interop.swpublished
4
5 ' la classe des propriétés
6
7 Namespace RealConstant
8 Public Class RealConstant
9 Dim iSwApp As SldWorks.SldWorks
10 Dim userAddin As MAGIC.Magic
11 Dim handler As RCPageHandler
12 Dim ppage As sldworks.PropertyManagerPage2
13
14 #Region "Property Manager Page Controls"
15 'Groupes
16 Dim group1 As sldworks.PropertyManagerPageGroup
17 Dim group2 As sldworks.PropertyManagerPageGroup
18 Dim group3 As sldworks.PropertyManagerPageGroup
19
20 ''Controles
21 Dim combo1 As sldworks.PropertyManagerPageCombobox
22 Dim combo2 As sldworks.PropertyManagerPageCombobox
23 Dim combo3 As sldworks.PropertyManagerPageCombobox
24 Dim selection1 As sldworks.PropertyManagerPageSelectionbox
25 Dim CheckBox1 As SldWorks.PropertyManagerPageCheckbox
26 Dim CheckBox2 As SldWorks.PropertyManagerPageCheckbox
27 Dim selection2 As sldworks.PropertyManagerPageSelectionbox
28 Dim selection3 As sldworks.PropertyManagerPageSelectionbox
29 Dim Numberbox1 As sldworks.PropertyManagerPageNumberbox
30 Dim Numberbox2 As sldworks.PropertyManagerPageNumberbox
31 Dim NumberboxD1 As sldworks.PropertyManagerPageNumberbox
32 Dim NumberboxD2 As sldworks.PropertyManagerPageNumberbox
33 Dim NumberboxD3 As sldworks.PropertyManagerPageNumberbox
34 Dim NumberboxD4 As sldworks.PropertyManagerPageNumberbox
35 Dim NumberboxD5 As sldworks.PropertyManagerPageNumberbox
36 Dim NumberboxD6 As sldworks.PropertyManagerPageNumberbox
37 Dim Numberbox5 As sldworks.PropertyManagerPageNumberbox
38 Dim Numberbox6 As sldworks.PropertyManagerPageNumberbox
39 Dim Label1 As sldworks.PropertyManagerPageLabel
40 Dim Label2 As sldworks.PropertyManagerPageLabel
41 Dim Label3 As sldworks.PropertyManagerPageLabel
42 Dim Label4 As sldworks.PropertyManagerPageLabel
43 Dim Label5 As sldworks.PropertyManagerPageLabel
44 Dim Label6 As sldworks.PropertyManagerPageLabel
45 Dim Label7 As sldworks.PropertyManagerPageLabel
46 Dim Label8 As sldworks.PropertyManagerPageLabel
47 Dim Label9 As sldworks.PropertyManagerPageLabel
48 Dim Label10 As sldworks.PropertyManagerPageLabel
49 Dim Label11 As sldworks.PropertyManagerPageLabel
50 Dim Label12 As sldworks.PropertyManagerPageLabel
51 Dim LabelD3 As sldworks.PropertyManagerPageLabel
52 Dim LabelD4 As sldworks.PropertyManagerPageLabel
53 Dim LabelD5 As sldworks.PropertyManagerPageLabel
54 Dim LabelD6 As sldworks.PropertyManagerPageLabel
55
56
57
58
59 #End Region
60
61 Function Init(ByVal sw As SldWorks.SldWorks, ByVal addin As MAGIC.Magic) As Object
62 iSwApp = sw
63 userAddin = addin
64 CreatePage()
65 AddControls()
66 Return Nothing
67 End Function
68
69 Sub Show()
70 ppage.Show()
71 End Sub
72
73 Sub CreatePage()
74 handler = New RCPageHandler
75 handler.Init(iSwApp, userAddin)
76 Dim options As Integer
77 Dim errors As Integer
78 options = swPropertyManagerPageOptions_e.swPropertyManagerOptions_OkayButton + swPropertyManagerPageOptions_e.swPropertyManagerOptions_CancelButton
79 ppage = iSwApp.CreatePropertyManagerPage("Poutres et coques", options, handler, errors)
80 End Sub
81
82 Sub AddControls()
83 Dim options As Integer
84 Dim leftAlign As Integer
85 Dim controlType As Integer
86
87 ' premier groupe, les poutres
88 options = swAddGroupBoxOptions_e.swGroupBoxOptions_Visible + swAddGroupBoxOptions_e.swGroupBoxOptions_Checkbox
89 group1 = ppage.AddGroupBox(0, "Propriété des poutres", options)
90 RCCode.GroupPoutre = group1
91
92
93 controlType = swPropertyManagerPageControlType_e.swControlType_Checkbox
94 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
95 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible
96 CheckBox1 = group1.AddControl(1, controlType, "Utiliser la face comme section de la poutre", leftAlign, options, "La face intersectant la poutre correspond à la section de la poutre")
97 RCCode.RCCheckFacedeSection = CheckBox1
98
99 Label1 = group1.AddControl(2, swPropertyManagerPageControlType_e.swControlType_Label, "Choisir le matériau", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "choisir le matériau si la poutre n'est pas du matériau par défaut")
100
101 controlType = swPropertyManagerPageControlType_e.swControlType_Combobox
102 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
103 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
104 combo1 = group1.AddControl(2, controlType, "Matériau pour cette poutre", leftAlign, options, "Définir le matériau qui sera utilisé pour cette poutre") '"Choix du type de condition à appliquer à (aux) entité(s) sélectionnée(s)")
105 If Not combo1 Is Nothing Then
106 combo1.Height = 500
107 combo1.Style = swPropMgrPageComboBoxStyle_e.swPropMgrPageComboBoxStyle_EditableText
108 End If
109 combo1.Style = SwConst.swPropMgrPageComboBoxStyle_e.swPropMgrPageComboBoxStyle_Sorted
110 RCCode.RCcombo1 = combo1
111
112
113 Label9 = group1.AddControl(3, swPropertyManagerPageControlType_e.swControlType_Label, "Choisir une poutre dans la base de donnée", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Une poutre choisie parmis celles dans la base de donnée entrera automatiquement les valeurs d'inertie et autre")
114
115 ' combo2, poutre de la bibliothèque
116 controlType = swPropertyManagerPageControlType_e.swControlType_Combobox
117 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
118 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
119 combo2 = group1.AddControl(4, controlType, "Utiliser une poutre de la bibliothèque", leftAlign, options, "Utilisez une des poutres standard définie dans la bibliothèque pour ses constantes") '"Choix du type de condition à appliquer à (aux) entité(s) sélectionnée(s)")
120 If Not combo2 Is Nothing Then
121 combo2.Height = 500
122 End If
123 combo2.Style = SwConst.swPropMgrPageComboBoxStyle_e.swPropMgrPageComboBoxStyle_Sorted
124 RCCode.RCcombo2 = combo2
125
126
127 Label2 = group1.AddControl(5, swPropertyManagerPageControlType_e.swControlType_Label, "Courbes", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Sélectionnez les courbes qui deviendront des poutres")
128
129 ' le selectionbox des courbes qui deviendront des poutres
130 controlType = swPropertyManagerPageControlType_e.swControlType_Selectionbox
131 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
132 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
133 selection1 = group1.AddControl(6, controlType, "Poutres", leftAlign, options, "Sélectionnez les poutres")
134 If Not selection1 Is Nothing Then
135 Dim filter() As Integer = New Integer() {swSelectType_e.swSelREFCURVES, swSelectType_e.swSelEDGES, swSelectType_e.swSelHELIX, swSelectType_e.swSelREFERENCECURVES}
136 selection1.Height = 50
137 selection1.SetSelectionFilters(filter)
138 End If
139 RCCode.RCselection1 = selection1
140
141 Label3 = group1.AddControl(7, swPropertyManagerPageControlType_e.swControlType_Label, "Troisième point", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Le point qui sert à définir l'orientation de la section de la poutre. Il pointe dans la direction principale pour l'inertie.")
142
143 ' le selectionbox des points pour l'orientation de la direction principale
144 ' attention, il faudrait revoir les filtres...
145 controlType = swPropertyManagerPageControlType_e.swControlType_Selectionbox
146 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
147 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
148 selection2 = group1.AddControl(8, controlType, "Troisième point", leftAlign, options, "Sélectionnez le point qui indiquera la direction principale")
149 If Not selection2 Is Nothing Then
150 Dim filter() As Integer = New Integer() {swSelectType_e.swSelVERTICES, swSelectType_e.swSelEXTSKETCHPOINTS} ', swSelectType_e.swSelMIDPOINTS, swSelectType_e.swSelPOINTREFS, swSelectType_e.swSelPOINTREFS}
151 selection2.Height = 15
152 selection2.SetSelectionFilters(filter)
153 End If
154 selection2.SingleEntityOnly = True
155 'selection2.Mark = 1
156 RCCode.RCselection2 = selection2
157
158
159
160 Label6 = group1.AddControl(13, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D1", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D1")
161 RCCode.LabelD1 = Label6
162 'Numberbox3, D1
163 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
164 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
165 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
166 NumberboxD1 = group1.AddControl(14, controlType, "Longueur D1", leftAlign, options, "Entrez la valeur de la longueur D1")
167 NumberboxD1.Value = 0.005
168 NumberboxD1.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.000001, 5000, 0.001, True)
169 RCCode.RCNumberboxD1 = NumberboxD1
170
171
172 Label7 = group1.AddControl(15, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D2", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D2")
173 RCCode.LabelD2 = Label7
174 'Numberbox4, longueur dans la diretion secondaire (largeur)
175 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
176 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
177 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
178 NumberboxD2 = group1.AddControl(16, controlType, "Longueur D2", leftAlign, options, "Entrez la valeur de la longueur D2")
179 NumberboxD2.Value = 0.003
180 NumberboxD2.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00001, 5000, 0.001, True)
181 RCCode.RCNumberboxD2 = NumberboxD2
182
183
184 LabelD3 = group1.AddControl(17, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D3", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D3")
185 RCCode.LabelD3 = LabelD3
186 'Numberbox4, longueur dans la diretion secondaire (largeur)
187 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
188 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
189 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
190 NumberboxD3 = group1.AddControl(18, controlType, "Longueur D3", leftAlign, options, "Entrez la valeur de la longueur D3")
191 NumberboxD3.Value = 0.003
192 NumberboxD3.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00001, 5000, 0.001, True)
193 RCCode.RCNumberboxD3 = NumberboxD3
194
195 LabelD4 = group1.AddControl(19, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D4", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D4")
196 RCCode.LabelD4 = LabelD4
197 'Numberbox4, longueur dans la diretion secondaire (largeur)
198 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
199 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
200 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
201 NumberboxD4 = group1.AddControl(20, controlType, "Longueur D4", leftAlign, options, "Entrez la valeur de la longueur D4")
202 NumberboxD4.Value = 0.003
203 NumberboxD4.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00001, 5000, 0.001, True)
204 RCCode.RCNumberboxD4 = NumberboxD4
205
206
207 LabelD5 = group1.AddControl(17, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D5", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D5")
208 RCCode.LabelD5 = LabelD5
209 'Numberbox4, longueur dans la diretion secondaire (largeur)
210 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
211 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
212 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
213 NumberboxD5 = group1.AddControl(22, controlType, "Longueur D5", leftAlign, options, "Entrez la valeur de la longueur D5")
214 NumberboxD5.Value = 0.003
215 NumberboxD5.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00001, 5000, 0.001, True)
216 RCCode.RCNumberboxD5 = NumberboxD5
217
218 LabelD6 = group1.AddControl(19, swPropertyManagerPageControlType_e.swControlType_Label, "Dimension D6", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "La longueur D6")
219 RCCode.LabelD6 = LabelD6
220 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
221 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
222 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
223 NumberboxD6 = group1.AddControl(24, controlType, "Longueur D6", leftAlign, options, "Entrez la valeur de la longueur D6")
224 NumberboxD6.Value = 0.003
225 NumberboxD6.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00001, 5000, 0.001, True)
226 RCCode.RCNumberboxD6 = NumberboxD6
227
228
229 Label8 = group1.AddControl(30, swPropertyManagerPageControlType_e.swControlType_Label, "Aire de la section", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "L'aire de la section de la poutre")
230 'Numberbox5, aire de la section
231 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
232 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
233 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
234 Numberbox5 = group1.AddControl(31, controlType, "Aire de la section [m^2]", leftAlign, options, "Entrez l'aire de la section de la poutre")
235 Numberbox5.Value = 10
236 Numberbox5.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_UnitlessDouble, 0, 10000000, 10, True)
237 RCCode.RCNumberbox5 = Numberbox5
238
239 Label4 = group1.AddControl(9, swPropertyManagerPageControlType_e.swControlType_Label, "Ixx [m^4]", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Valeur de l'inertie selon l'axe des y de la poutre (Iyy)")
240 'Numberbox1, Inertie direction principale
241 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
242 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
243 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
244 Numberbox1 = group1.AddControl(10, controlType, "Inertie en Ixx", leftAlign, options, "Valeur de l'inertie selon l'axe des x de la poutre (Ixx)")
245 Numberbox1.Value = 1000
246 Numberbox1.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_UnitlessDouble, 0, 10000000000.0, 1000, True)
247 RCCode.RCNumberbox1 = Numberbox1
248
249 Label5 = group1.AddControl(11, swPropertyManagerPageControlType_e.swControlType_Label, "Iyy [m^4]", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Valeur de l'inertie dans la direction secondaire, perpendiculaire à la direction du troisième point")
250 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
251 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
252 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
253 Numberbox2 = group1.AddControl(12, controlType, "Inertie dans la direction perpendiculaire Iyy", leftAlign, options, "Entrez la valeur de l'inertie dans la direction secondaire")
254 Numberbox2.Value = 1000
255 Numberbox2.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_UnitlessDouble, 0, 10000000000.0, 1000, True)
256 RCCode.RCNumberbox2 = Numberbox2
257
258
259 ' deuxième groupe pour les coques
260 options = swAddGroupBoxOptions_e.swGroupBoxOptions_Visible + swAddGroupBoxOptions_e.swGroupBoxOptions_Checkbox
261 group2 = ppage.AddGroupBox(32, "Propriété des coques", options)
262 RCCode.GroupCoque = group2
263
264 Label10 = group2.AddControl(33, swPropertyManagerPageControlType_e.swControlType_Label, "Choisir le matériau", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "choisir le matériau si la coque n'est pas du matériau par défaut")
265
266 ' combo3, le matériau de la coque
267
268 controlType = swPropertyManagerPageControlType_e.swControlType_Checkbox
269 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
270 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible
271 CheckBox2 = group2.AddControl(40, controlType, "Utiliser la face comme section de la coque", leftAlign, options, "La face intersectant la coque correspond à la section de la coque")
272 RCCode.RCCheckFacedeSectionCoque = CheckBox2
273
274
275 controlType = swPropertyManagerPageControlType_e.swControlType_Combobox
276 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
277 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
278 combo3 = group2.AddControl(34, controlType, "Matériau pour cette coque", leftAlign, options, "Définir le matériau qui sera utilisé pour cette coque") '"Choix du type de condition à appliquer à (aux) entité(s) sélectionnée(s)")
279 If Not combo3 Is Nothing Then
280 combo3.Height = 40
281 combo3.Style = swPropMgrPageComboBoxStyle_e.swPropMgrPageComboBoxStyle_EditableText
282 End If
283 RCCode.RCcombo3 = combo3
284
285 Label11 = group2.AddControl(35, swPropertyManagerPageControlType_e.swControlType_Label, "Sélectionnez les faces", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Sélection des faces qui sont des coques")
286
287
288 ' selection3' pour les faces qui seront des coques
289 controlType = swPropertyManagerPageControlType_e.swControlType_Selectionbox
290 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
291 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
292 selection3 = group2.AddControl(36, controlType, "Faces", leftAlign, options, "Sélectionnez les faces qui seront des coques")
293 If Not selection3 Is Nothing Then
294 Dim filter() As Integer = New Integer() {swSelectType_e.swSelREFFACES, swSelectType_e.swSelREFSURFACES, swSelectType_e.swSelFACES}
295 selection3.Height = 50
296 selection3.SetSelectionFilters(filter)
297 End If
298 RCCode.RCselection3 = selection3
299 selection3.Style = swconst.swPropMgrPageSelectionBoxStyle_e.swPropMgrPageSelectionBoxStyle_HScroll
300
301 Label12 = group2.AddControl(37, swPropertyManagerPageControlType_e.swControlType_Label, "Épaisseur", swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge, swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_Enabled, "Épaisseur de la coque")
302
303 ' numberbox6, épaisseur de la coque
304 controlType = swPropertyManagerPageControlType_e.swControlType_Numberbox
305 leftAlign = swPropertyManagerPageControlLeftAlign_e.swControlAlign_LeftEdge
306 options = swAddControlOptions_e.swControlOptions_Enabled + swAddControlOptions_e.swControlOptions_Visible + swAddControlOptions_e.swControlOptions_SmallGapAbove
307 Numberbox6 = group2.AddControl(38, controlType, "Épaisseur de la coque", leftAlign, options, "Entrez l'épaisseur de cette (ces) coque(s)")
308 Numberbox6.Value = 0.01
309 Numberbox6.SetRange(SwConst.swNumberboxUnitType_e.swNumberBox_Length, 0.00000001, 10000000, 0.001, True)
310 RCCode.RCNumberbox6 = Numberbox6
311
312 RCCode.PopulerCombo(True) ' pour mettre des valeurs dans les combobox
313 End Sub
314 End Class
315
316
317
318
319 End Namespace