OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Search Forums

Showing results 1 to 25 of 145
Search took 0.02 seconds.
Search: Posts Made By: shark
Forum: CorelDRAW/Corel DESIGNER VBA 16-11-2018, 04:17
Replies: 1
Views: 1,299
Posted By shark
show your code

show your code
Forum: CorelDRAW/Corel DESIGNER VBA 16-11-2018, 04:10
Replies: 3
Views: 1,242
Posted By shark
use FindSegmentAtPoint(x,y,ofs) to find segment,...

use FindSegmentAtPoint(x,y,ofs) to find segment, then AddNodeAt ofs to create node
Forum: CorelDRAW/Corel DESIGNER VBA 13-11-2018, 04:24
Replies: 3
Views: 1,242
Posted By shark
use Segment.AddNodeAt or SubPath.AddNodeAt

use Segment.AddNodeAt or SubPath.AddNodeAt
Forum: CorelDRAW/Corel DESIGNER VBA 10-07-2018, 04:14
Replies: 11
Views: 1,941
Posted By shark
Sub FillRandShapes() Const MaxSize = 15 Const...

Sub FillRandShapes()
Const MaxSize = 15
Const MinSize = 5
Dim s As Shape, X#, Y#, w#, h#, z&
ActiveDocument.Unit = cdrMillimeter
ActivePage.GetBoundingBox X, Y, w, h
Randomize
...
Forum: CorelDRAW/Corel DESIGNER VBA 09-07-2018, 07:08
Replies: 11
Views: 1,941
Posted By shark
You may change Set s =...

You may change
Set s = ActiveLayer.CreateEllipse2(x + Rnd * w, y + Rnd * h, Rnd * MaxSize + MinSize)
to
Set s = ActiveLayer.CreatePolygon2(x + Rnd * w, y + Rnd * h, Rnd * MaxSize + MinSize, NSide,...
Forum: CorelDRAW/Corel DESIGNER VBA 06-07-2018, 02:46
Replies: 11
Views: 1,941
Posted By shark
in theory, you can add each created ellipse to...

in theory, you can add each created ellipse to the group and check the intersection with this shape-group, using Shape.Intersect. If the function returns an object, then delete the ellipse and create...
Forum: CorelDRAW/Corel DESIGNER VBA 06-07-2018, 02:40
Replies: 11
Views: 1,941
Posted By shark
Sub FillRandomCircles() Const MaxSize = 15 'max...

Sub FillRandomCircles()
Const MaxSize = 15 'max radius of ellipse, i.e. MinSize + MaxSize
Const MinSize = 5 'min radius
Dim s As Shape, x#, y#, w#, h#, z&
ActiveDocument.Unit = cdrMillimeter...
Forum: CorelDRAW/Corel DESIGNER VBA 05-07-2018, 04:20
Replies: 11
Views: 1,941
Posted By shark
It's not difficult to fill rectangle with...

It's not difficult to fill rectangle with circles. It's harder to check that the circles do not intersect
Forum: CorelDRAW/Corel DESIGNER VBA 29-06-2018, 09:37
Replies: 2
Views: 939
Posted By shark
faced a similar situation in X8. Solved the...

faced a similar situation in X8. Solved the problem using the prefix. MSForms.Control or something like it
Forum: Macros/Add-ons 04-06-2018, 02:52
Replies: 15
Views: 4,746
Posted By shark
works but

what version of Corel Draw do you have?
Forum: Macros/Add-ons 01-06-2018, 05:03
Replies: 15
Views: 4,746
Posted By shark
try this: Sub RemoveWasteColors() Dim c As...

try this:

Sub RemoveWasteColors()
Dim c As Color, sr As New ShapeRange, srAllShapes As ShapeRange, s As Shape
Set srAllShapes = ActivePage.Shapes.All
For Each c In...
Forum: Macros/Add-ons 28-05-2018, 03:16
Replies: 15
Views: 4,746
Posted By shark
there is no need to select all the shapes. Macro...

there is no need to select all the shapes. Macro deletes one selected shape and removes its color from the palette, if there are no more objects with the same color in current document.

if you...
Forum: Macros/Add-ons 24-05-2018, 05:05
Replies: 15
Views: 4,746
Posted By shark
delete color from palette

Sub DeleteColors()
Dim s As Shape, c As Color
Set s = ActiveShape: If s Is Nothing Then Exit Sub
If s.Fill.Type <> cdrUniformFill Then Exit Sub
Set c = s.Fill.UniformColor
...
Forum: Macros/Add-ons 18-05-2018, 06:31
Replies: 15
Views: 4,746
Posted By shark
Hi If you programmatically delete shape then...

Hi
If you programmatically delete shape then you can check if there are any other objects of the same color left. And then delete this color from palette
Forum: CorelDRAW/Corel DESIGNER VBA 18-05-2018, 06:18
Replies: 5
Views: 1,740
Posted By shark
No. Object "shape" can be a "group" or...

No. Object "shape" can be a "group" or "powerclip" and contain other objects. If you have selected some shapes and want to work with them, then use ShapeRange
Forum: CorelDRAW/Corel DESIGNER VBA 17-05-2018, 03:29
Replies: 5
Views: 1,740
Posted By shark
use ActiveSelectionRange Sub test() Dim sr as...

use ActiveSelectionRange
Sub test()
Dim sr as ShapeRange
Set sr = ActiveSelectionRange
ActiveDocument.ClearSelection
MsgBox sr.Count
End Sub
Forum: CorelDRAW/Corel DESIGNER VBA 20-03-2018, 04:17
Replies: 5
Views: 1,861
Posted By shark
slightly improved code (:

Sub CenterGroup()
Dim s As Shape, sr As ShapeRange
Set sr = ActiveSelectionRange: If sr.Count = 0 Then Beep: Exit Sub
Set s = sr.FirstShape: sr.Remove 1 'align to bottom shape
...
Forum: CorelDRAW/Corel DESIGNER VBA 07-03-2018, 02:19
Replies: 3
Views: 1,361
Posted By shark
try this

Sub SetObjectNamesFromPageNames()

Dim p As Page
Dim s As Shape

For Each p In ActiveDocument.Pages

If InStr(p.name, " ") > 1 Then
set s =...
Forum: CorelDRAW/Corel DESIGNER VBA 12-07-2017, 04:48
Replies: 3
Views: 1,216
Posted By shark
Curve consists of nodes. Therefore you may use:...

Curve consists of nodes. Therefore you may use: Curve.Nodes.First and .Last
Every node have a PositionX and PositionY.

Dim s As Shape, x1#, y1#, x2#, y2#
Set s = ActiveShape
...
Forum: CorelDRAW/Corel DESIGNER VBA 28-06-2017, 03:35
Replies: 4
Views: 1,451
Posted By shark
example from CorelDRAW VBA Help

Sub Test()
Dim sr As ShapeRange
Dim sp1 As SubPath, sp2 As SubPath
Dim cps As CrossPoints, cp As CrossPoint
Dim x As Double, y As Double, n As Long

Set sr = ActiveSelectionRange
If sr.Count...
Forum: CorelDRAW/Corel DESIGNER VBA 22-06-2017, 08:39
Replies: 1
Views: 910
Posted By shark
There are two ways to solve the problem. First -...

There are two ways to solve the problem. First - use arrays instead of regular variables. Instead x1 = 5, x2 = 3, x3 = 10 etc. use Ar(1) = 5, Ar(2) = 3, Ar(3) = 10. Then the maximum value can be...
Forum: CorelDRAW/Corel DESIGNER VBA 20-06-2017, 12:20
Replies: 1
Views: 1,003
Posted By shark
You better use ShapeRange. Dim sr As New...

You better use ShapeRange.

Dim sr As New ShapeRange, c%, i%, x#, y#, dx#, dy#
'set variables x,y, dx etc.
i = 4
for c = 0 to i
sr.Add ActiveLayer.CreateLineSegment(x, y, x + dx, y + dy)...
Forum: CorelDRAW/Corel DESIGNER VBA 12-05-2017, 06:28
Replies: 6
Views: 1,681
Posted By shark
Remove proportional sizing

Private Sub CopyWH()
Dim s As Shape, cs As Shape, w#, w1#, h#, h1#, b As Boolean, Shift&
Set cs = ActiveShape: If cs Is Nothing Then Exit Sub
cs.GetSize w1, h1 'get source size
b =...
Forum: CorelDRAW/Corel DESIGNER VBA 05-05-2017, 09:14
Replies: 1
Views: 966
Posted By shark
Show your code

Show your code
Forum: CorelDRAW/Corel DESIGNER VBA 28-04-2017, 02:58
Replies: 6
Views: 1,681
Posted By shark
Here is ready macro, works with...

Here is ready macro, works with Ctrl/Shift/without
Private Sub CopyWH()
Dim s As Shape, cs As Shape, w#, h#, b As Boolean, Shift&
Set cs = ActiveShape: If cs Is Nothing Then Exit Sub
b =...
Showing results 1 to 25 of 145

 
Forum Jump

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


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