Salome HOME
This commit was generated by cvs2git to create tag 'V1_4_0b2'.
[modules/kernel.git] / doc / html / INPUT / exemple / Example23.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>\r
2 <HEAD>\r
3 <!-- hennerik CVSweb $Revision$ -->\r
4 <TITLE>Exemple</TITLE></HEAD>\r
5 <BODY BGCOLOR="#eeeeee">\r
6 <HR noshade><PRE>\r
7 import batchmode_salome\r
8 #import SALOMEDS\r
9 \r
10 aStudy = batchmode_salome.myStudy &nbsp; &nbsp;\r
11 \r
12 #Add new component 'User data'\r
13 aBuilder = aStudy.NewBuilder()\r
14 aComponent = aBuilder.NewComponent(&quot;User data&quot;)\r
15 anAttr = aBuilder.FindOrCreateAttribute(aComponent, &quot;AttributeName&quot;)\r
16 anAttrName = anAttr._narrow(SALOMEDS.AttributeName) \r
17 anAttrName.SetValue(&quot;User data&quot;)\r
18 \r
19 \r
20 #Add a new case 'Case1' to the component 'User data'\r
21 aBuilder.AddDirectory(&quot;/User data/Case1&quot;)\r
22 \r
23 #Set a study context to '/User data/Case1'\r
24 aStudy.SetContext(&quot;/User data/Case1&quot;)\r
25 \r
26 #Print the current study context\r
27 print aStudy.GetContext()\r
28 \r
29 #Add a sub directory 'aSubCase' to 'Case1' (under the current context)\r
30 aBuilder.AddDirectory(&quot;aSubCase&quot;)\r
31 \r
32 \r
33 #Add a new case 'Case2' to component 'User data'\r
34 aBuilder.AddDirectory(&quot;/User data/Case2&quot;)\r
35 </PRE>