![]() |
#1
|
|||
|
|||
![]()
' The question that I have is this: With my lookup table containing the
'object number and the visibility status, is there a way to update all 'objects visibility property and then do a "refresh" on the objects? (I am 'hoping that the time to refresh will be on the order of the 'PHOTOPAINT.CorelScript.ObjectVisible 1, 80, False command) In this 'example the time difference is not too bad. In my application, I have 'over 1000 objects which takes close to an hour and I need to repeat this 'process 5,000 - 10,000 times. 'I was not able to upload my program. To execute this code, in a new 'project, add 80 objects. In VB add two command buttons and two 'labels. The two buttons toggle the objects on and off and the labels to 'display the time. Dim obj_ctr As Long Dim Start, Finish, TotalTime Private Sub CommandButton1_Click() Start = Timer ' Note: The timer here is just to measure the response time. ' This line of code is processed very fast. In my actual program, this 'line updates all of the objects just about as fast. The problem 'that I have is that not all of my objects are all off or on. They are mixed. PHOTOPAINT.CorelScript.ObjectVisible 1, 80, False Finish = Timer TotalTime = Finish - Start Label2.Caption = TotalTime End Sub Private Sub CommandButton2_Click() Start = Timer ' Note: In my code, I will change the visibility requirement for each 'object. This will be maintained in a lookup table (2-D Array ; object 'number, visibility: 1 on - 0 off) For obj_ctr = 1 To 80 ' Note: In the actual code, I have conditional statements and a 'lookup table to determine if this line of code is activated. If the lookup 'table for obj_ctr number 5 is to be on then this line would be activated. 'Please note that the process time to make the decisions in the actual 'program is fast. My problem comes in when I update the objects 'visibility. I also found that there is no difference in time from turning the 'objects on verses off. PHOTOPAINT.CorelScript.ObjectVisible obj_ctr, obj_ctr, True 'Note: If you remove the comment on the DoEvents command, you 'will see the objects update one at a time. This will slow down the update 'time as well. 'DoEvents Next obj_ctr Finish = Timer TotalTime = Finish - Start Label2.Caption = TotalTime End Sub |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
fit objects to path edges | geopig | Other Oberon Commercial Products | 1 | 02-08-2006 23:28 |
Find objects by properties | Webster | CorelDRAW/Corel DESIGNER VBA | 8 | 01-12-2004 18:51 |
Label Caption Live Update | ddonnahoe | CorelDRAW/Corel DESIGNER VBA | 10 | 09-04-2004 10:59 |
Need help accessing objects in a group | ama | CorelDRAW/Corel DESIGNER VBA | 5 | 20-02-2004 11:28 |
Module Update Available | johndankey | Macros/Add-ons | 0 | 17-07-2003 14:47 |