3 Cover specific working with the data model results
6 #=========================================================================
7 # Initialization of the test
8 #=========================================================================
11 __updated__ = "2016-20-16"
13 aSession = ModelAPI_Session.get()
15 #=========================================================================
16 # Check getting the initial construction plane by name
17 #=========================================================================
18 aPartSet = aSession.moduleDocument()
19 aSession.startOperation()
20 aPlaneX = aPartSet.objectByName("Construction", "YOZ");
22 aColors = aPlaneX.data().intArray("Color")
24 # default colors, not filled array
25 assert(aColors.size() == 0)
27 aColors.setValue(0, 100)
28 aColors.setValue(1, 200)
29 aColors.setValue(2, 250)
30 assert(aColors.size() == 3)
31 assert(aColors.value(0) == 100)
32 assert(aColors.value(1) == 200)
33 assert(aColors.value(2) == 250)
35 aSession.finishOperation()