Results 1 to 8 of 8

Thread: Need a simple script for Corel 2019

  1. #1
    Join Date
    Mar 2011
    Location
    Anaheim, Ca
    Posts
    899

    Need a simple script for Corel 2019

    I have looked all over and can not find a simple script. I need it to select all the same color outline. So click on one outline that is black and then it will select them all.

    Any ideas looked at jeffs macros and macromonster nothing, well jeff says he has one but it is the same file for x4 to 2019 so it does not work.
    Craig Matheny
    Anaheim, Ca
    45 watt Epilog Laser, 60 watt Epilog Laser,
    Plasma Cutter, MiG Welder
    Rikon 70-100 Lathe
    Shop Smith V510, To many hand Tools and
    Universal Repair Kit (1- Hammer and 1- Roll of Duck Tape)

  2. #2
    Never learned how to do scripts or macros, but you can do what you're after using the 'find objects' function...

    first, if you're wanting everything with black outlines, select something with a black outline, then click the EDIT tab/Find and Replace/Find objects - and the 'find wizard' should come up. Choose "find objects that match the currently selected object"-- the default page comes up, and if you want EVERYTHING about your selection to be found, hit the save button--- but since you're after ONLY black outlined objects, hit the EDIT button: under the object types tab, check the 'any type of object' box; under the fills tab, check nothing for just an outline search; under the outlines tab, click the 'outline properties' box, under the special effects tab check nothing... after that you get more specifics to choose or ignore...

    I haven't used this part of Corel much so I don't know much else about it. The macro you're looking for would, I'm assuming, do all of the above automatically-? Which would be nice
    ========================================
    ELEVEN - rotary cutter tool machines
    FOUR - CO2 lasers
    THREE- make that FOUR now - fiber lasers
    ONE - vinyl cutter
    CASmate, Corel, Gravostyle


  3. #3
    Join Date
    Mar 2011
    Location
    Anaheim, Ca
    Posts
    899
    Ken thanks that does work so for now a solution but need a script still... Anyone?
    Craig Matheny
    Anaheim, Ca
    45 watt Epilog Laser, 60 watt Epilog Laser,
    Plasma Cutter, MiG Welder
    Rikon 70-100 Lathe
    Shop Smith V510, To many hand Tools and
    Universal Repair Kit (1- Hammer and 1- Roll of Duck Tape)

  4. #4
    Join Date
    Sep 2010
    Location
    Finger Lakes NY
    Posts
    70
    Have you looked at ecut http://eng.e-cut.ru/
    Trotec Speedy 400 80 watt

  5. #5
    If you're comfortable with programming that should be easy to do with the macro recorder.

  6. #6
    I don't think macro recorder will record the Find function so that probably wouldn't work.

    No guarantees on this code because I don't have CD2019, but the following appears to work (as I understand your request) in X7. However, I probably haven't made it bullet proof, so caveat emptor; YMMV; use at your own risk; not responsible for any loss of life or property, whether tangible or intangible, due to your use of this code; all rights reserved; no other warranty whether express or implied; and all the other legal bs that could or might apply, both now and in the future, etc. et al ad nauseum ;^)

    Eh, the indenting kept getting stripped out here so I substituted '*'s for the whitespace, which you will have to fix up...

    Sub findoutlines()
    **Dim S As Shape
    **Dim TargetColor As Color
    **Dim SR As New ShapeRange

    **On Error GoTo findoutlines_Error

    **Optimization = True
    **ActiveDocument.BeginCommandGroup "findoutlines" 'this lets us unwind entire macro action with a single undo called "findoutlines"

    **If ActivePage.Shapes.Count > 1 Then 'there has to be at least 2 shapes
    ****If ActiveSelection.Shapes.Count = 1 Then 'and exactly one of them has to be selected
    ******If ActiveSelection.Shapes.First.Outline.Type <> cdrNoOutline Then 'and it has to have an outline
    ********Set TargetColor = ActiveSelection.Shapes.First.Outline.Color 'find its outline color
    ********'Now select all shapes with that same target Outline color
    ********For Each S In ActivePage.Shapes.All
    **********If S.Outline.Color.IsSame(TargetColor) Then
    ************SR.Add S
    **********End If
    ********Next S
    ********SR.CreateSelection
    ******End If
    ****End If
    **End If

    **'free up memory
    **Set S = Nothing
    **Set TargetColor = Nothing
    **Set SR = Nothing
    **ActiveDocument.EndCommandGroup
    **Optimization = False
    **EventsEnabled = True
    **ActiveWindow.Refresh

    **On Error GoTo 0
    **Exit Sub


    findoutlines_Error:
    **'free up memory
    **Set S = Nothing
    **Set TargetColor = Nothing
    **Set SR = Nothing
    **ActiveDocument.EndCommandGroup
    **Optimization = False
    **ActiveWindow.Refresh
    **MsgBox "Error " & Err.Number & " (" & Err.Description & ") in sub findoutlines of Module findoutlines"


    End Sub

  7. #7
    ***crickets***

  8. #8
    yeah, frustrating...
    ========================================
    ELEVEN - rotary cutter tool machines
    FOUR - CO2 lasers
    THREE- make that FOUR now - fiber lasers
    ONE - vinyl cutter
    CASmate, Corel, Gravostyle


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •