Thread: .AddToPowerclip
View Single Post
  #3  
Old 05-10-2015, 09:32
HeauxmBru HeauxmBru is offline
Junior Member
 
Join Date: Jan 2011
Posts: 17
Default

I simplified it down and still am having problems with .powerclip.
I want to take a selected shape and make a duplicate, do some stuff to it, then powerclip into the original shape.

.duplicate and .powerclip must not be compatible as I get an over stack error and then crash

So I turned to .getBoundingBox (for lack of anything better) but I now get a "powerclip operation failed" error

The funny thing is that I can create two shapes and powerclip one into the other.

Here is my code:
Code:
    
Set s1 = d.Selection

s1.GetBoundingBox x, y, w, h                   THIS DOES NOT WORK
Set s2 = lr.CreateRectangle2(x, y, w, h)
        
'    Set s1 = lr.CreateRectangle2(2, 2, 2, 2)    THIS WORKS
'    Set s2 = lr.CreateRectangle2(3, 3, 3, 3)

'    Set s2 = s1.Duplicate                           THIS CRASHES X6
        
s1.AddToPowerClip s2
I would like to know why it doesn't work or what I am overlooking.
Can anyone help?
Reply With Quote