OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-03-2008, 13:27
Steve
Guest
 
Posts: n/a
Default Is the a X3 to X4 Object Code difference reference?

Hi Gang, long time no see. I'm having trouble getting X4 VBA to advance to the next page..

Example: in a for i/next i loop I can't get "activedocument.pages(i+1).activate" to activate. it

Am I missing something... again

Thanks again for your help!
________
VAPORIZER PIPE

Last edited by Steve; 12-03-2011 at 01:34.
Reply With Quote
  #2  
Old 08-03-2008, 14:53
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

X4 new layer system introduced this bug it seems
maybe DoEvents will help? or maybe ....pages(i+1).ActiveLayer.Activate ?
Reply With Quote
  #3  
Old 08-03-2008, 20:47
Steve
Guest
 
Posts: n/a
Default

Thanks I tried the activelayer but it didn't help. I'm not sure how to use DoEvents in this context But I'll keep moving in that direction. Thanks again.
________
List of concept vehicles

Last edited by Steve; 12-03-2011 at 01:34.
Reply With Quote
  #4  
Old 08-03-2008, 20:53
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

I meant something like this:
Code:
activedocument.pages(i+1).activate
DoEvents
:-)
Reply With Quote
  #5  
Old 08-03-2008, 23:58
Steve
Guest
 
Posts: n/a
Default



Thanks. That didnt work either. is there another way to go to the next page?
________
YAMAHA XV250 SPECIFICATIONS

Last edited by Steve; 12-03-2011 at 01:34.
Reply With Quote
  #6  
Old 09-03-2008, 04:51
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

then how about using NextPage UI command:

Code:
FrameWork.Automation.Invoke "80e87d17-efc5-4d80-88d1-47b41850e530"
Reply With Quote
  #7  
Old 09-03-2008, 05:05
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

actually it seems that the page activation takes place successfully, but ActivePage object is broken in X4!

Use ActiveLayer.Page instead.

Tested with:
Code:
ActiveDocument.Pages(1).Activate: Debug.Print ActiveLayer.Page.Index
ActiveDocument.Pages(2).Activate: Debug.Print ActiveLayer.Page.Index
shows 1,2

P.S. Horrible, horrible bug
Reply With Quote
  #8  
Old 09-03-2008, 17:20
Steve
Guest
 
Posts: n/a
Default

I appreciate it. It still wont work. At least while not stepping throught it with the F8 key. /That/ seems to work ok. Weird. Thanks for your help.
________
Yl1

Last edited by Steve; 12-03-2011 at 01:34.
Reply With Quote
  #9  
Old 09-03-2008, 17:31
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

it is strange that it is not working... debug.print showed the correct 1,2 numbers while being run normally, no F8 stepping.

maybe there are some other references to ActivePage? if so convert them all to ActiveLayer.Page
Reply With Quote
  #10  
Old 09-03-2008, 20:02
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

I have an enormously HUGE problem as well:

Code:
dim sio As StructImportOptions

Set oResampler = New clsResampler
Set sio = CreateStructImportOptions
Set sio.ResampleHandler = oResampler
ActiveDocument.BeginCommandGroup "Job"
..................
sh.Layer.ImportEx(sFile, , sio).Finish
..................
ActiveDocument.EndCommandGroup
and a resampler handler
Code:
Implements VGCore.IImportResampleHandler
Private Function IImportResampleHandler_Resample(ByVal opt As VGCore.IStructImportResampleOptions) As Boolean
...................
...................no changes of the objects, only calculations
...................
end function
In X4 CommandGroup + my custom resampler don't work correctly. All the applied changes stack in *multitude* of undo's instead of just one as in all previous versions. This is something H-O-R-R-I-B-L-E! AAAAAAAAAAAH!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Bar code generator Webster Code Critique 2 06-09-2010 02:41
Background to object Fine! But Object to Background - How? marian General 2 15-07-2005 04:51
Text ENCODE Craig Tucker CorelDRAW/Corel DESIGNER VBA 10 26-01-2005 14:59
Sorting entries in the object manager dan CorelDRAW/Corel DESIGNER VBA 1 18-08-2004 23:16
How can I extract a piece of a bitmap object using VBA code oswaldon Corel Photo-Paint VBA 2 25-04-2004 20:37


All times are GMT -5. The time now is 18:12.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com