(0)| 5/7/2014 2:18 PM | |
|
Posts: 77 Rating:
|
I have 6 rectangles inside an faceplate. is it posible to resize these rectangles inside the faceplate. i know how to do it outside face plate : i group al 6 rectangles, so they shape like a Tank Misc\Name rectangle = LIC_1 ...... LIC_6 Parameters: ObjectName = "LIC" Heightobj = 100 'height of rectangle in pixels PV = 50 'Proces value of tank 0 ~ 100 % PVMax = 110 'Maximum procces value VBS Code: On Error Resume Next Dim Obj(10),Width,Height,X,Y Dim I If PV < 0 Then PV = 0 End If If PV > PVMax Then PV = PVMax End If '############################################################################################# For I = 1 To 6 Set Obj(I) = HmiRuntime.Screens(1).ScreenItems(ObjectName & "_" & CStr(I)) Next '############################################################################################# Height = Obj(1).Height Y = Obj(1).top Height = Heightobj - (Heightobj / PVMax * PV) If Height < 0 Then Height = 1 End If '############################################################################################# For I = 1 To 6 Obj(I).Height = Height Next See attachment for tank view, The grey are rectangles, and the brown is a tank symbole Now i do this using VB scipt with al groups but if a have 20 tanks is alot of time (changing al the object name etc..) is it possible to do this inside of a faceplate ? AttachmentTank full 0.pdf (178 Downloads) |
| 5/22/2014 7:49 AM | |
|
Posts: 98 Rating:
|
I can't find them too; Anyway,Rivas,you can make almost everything that you do out of a faceplate. Using scripts, make an event happen depending of a state of a Tag...etc. If your wondering How, I ask you, have you already worked with faceplates? because may be you can make a test with a simple animation, and there're examples with animations like those. See this link, may be can make you a basic idea. Sorry for my english. Best regards
|
Follow us on