1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
\r
3 <!-- hennerik CVSweb $Revision$ -->
\r
4 <TITLE>Exemple</TITLE></HEAD>
\r
5 <BODY BGCOLOR="#eeeeee">
\r
7 import batchmode_salome
\r
10 aStudy = batchmode_salome.myStudy
\r
12 #Add new component 'User data'
\r
13 aBuilder = aStudy.NewBuilder()
\r
14 aComponent = aBuilder.NewComponent("User data")
\r
15 anAttr = aBuilder.FindOrCreateAttribute(aComponent, "AttributeName")
\r
16 anAttrName = anAttr._narrow(SALOMEDS.AttributeName)
\r
17 anAttrName.SetValue("User data")
\r
20 #Add a new case 'Case1' to the component 'User data'
\r
21 aBuilder.AddDirectory("/User data/Case1")
\r
23 #Set a study context to '/User data/Case1'
\r
24 aStudy.SetContext("/User data/Case1")
\r
26 #Print the current study context
\r
27 print aStudy.GetContext()
\r
29 #Add a sub directory 'aSubCase' to 'Case1' (under the current context)
\r
30 aBuilder.AddDirectory("aSubCase")
\r
33 #Add a new case 'Case2' to component 'User data'
\r
34 aBuilder.AddDirectory("/User data/Case2")
\r