![]() |
#11
|
||||
|
||||
![]()
TobWen, just comment out or delete following line: .VirtualShape.SetBoundingBox x, y, w, h, KeepAspect:=True
|
#12
|
|||
|
|||
![]()
That has been my first try, but the object gets evaporate only - not replaced :-(
|
#13
|
||||
|
||||
![]()
sorry, my bad :p
replace Code:
sh.GetBoundingBox x, y, w, h With AgentSmith.TreeNode.GetCopy .VirtualShape.SetBoundingBox x, y, w, h, KeepAspect:=True Code:
sh.GetPosition x,y With AgentSmith.TreeNode.GetCopy .VirtualShape.SetPosition x,y |
#14
|
|||
|
|||
![]() Quote:
I'm using your code to exchange map symbols. Corel's symbol engine still can't handle transparency... MMh ... perhaps a last question [for today ![]() Would it be possible to clone an object instead copying it? Then I could change the master object only and everything else would change immediately. Best regards, Tobias |
#15
|
||||
|
||||
![]()
probably this will work, I haven't tested it:
replace Code:
Set VSR = New ShapeRange ActiveDocument.ReferencePoint = cdrCenter For Each sh In sr sh.GetBoundingBox x, y, w, h With AgentSmith.TreeNode.GetCopy .VirtualShape.SetBoundingBox x, y, w, h, KeepAspect:=True .LinkAsChildOf sh.Layer.TreeNode VSR.Add .VirtualShape End With Next ActiveDocument.LogCreateShapeRange VSR Code:
ActiveDocument.BeginCommandGroup "Scatter clones": Optimization = True: EventsEnabled = False: ActiveDocument.PreserveSelection = False For Each sh In sr sh.GetPosition x,y with AgentSmith.Clone .SetPosition x,y .MoveToLayer sh.Layer End With Next ActiveDocument.EndCommandGroup: Optimization = False: EventsEnabled = True: ActiveDocument.PreserveSelection = True CorelScript.RedrawScreen |
#16
|
|||
|
|||
![]()
Yes, it works! Thanks again. Very, very good work!
|
#17
|
|||
|
|||
![]()
Hi wOxxOm,
another idea concerning this code: I want to replace a dot (a small circle) with a pushpin. Is it possible to place the tip of a pushpin/needle on the old center of my dot, like Google Maps does for its markers? The current script would center the pushpin on the dot only :-) Best regards, Tobias |
#18
|
|||
|
|||
![]()
I've run into a new problem:
When replacing a grouped object with those small circles, each member of the group get replaced and note the group itself :-( That's how it looks like: http://imagebin.org/133071 Edit: I've fixed it myself. I've just changed Code:
Set sr = ActiveSelection.Shapes.FindShapes() Code:
Set sr = ActiveSelection.Shapes.All() Tobias Last edited by TobWen; 17-01-2011 at 11:24. |
#19
|
|||
|
|||
![]()
It stopped working in CorelDRAW v6
![]() Can anyone help me to fix it? |
#20
|
|||
|
|||
![]()
Gnahh ... my fault, works again
![]() |
![]() |
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 |
Trouble wtih shape names. | jahmer | Macros/Add-ons | 13 | 23-01-2008 19:05 |
Symbol shape is not found in a group | squonk | CorelDRAW/Corel DESIGNER VBA | 1 | 14-06-2007 06:32 |
CorelDRAW X3 VBA Code - Shape & Color LIster | JudyHNM | Code Critique | 2 | 05-04-2007 14:02 |
Any idea what's wrong with this shape? | jemmyell | CorelDRAW/Corel DESIGNER VBA | 4 | 08-05-2006 18:15 |
Howto uniquely identify a shape in VBA code | jemmyell | CorelDRAW/Corel DESIGNER VBA | 9 | 11-02-2005 21:05 |