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 05-10-2010, 13:46
kunghel kunghel is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Default Chance Crop Marks width

Ola

I'm needing to build a macro to create Crop Marks to my works, I saw that already has a very good macro created here:
http://forum.oberonplace.com/search.php?searchid=300410

However, I am doing art for screen printing, and the lines generated are very thin, and disappear when screen recording. Pelo menos 0,353 mm, para não desaparecer na gravação.

I tried to change the code, but my knowledge in VB is not enough to do it.

Can anyone help?
Reply With Quote
  #2  
Old 05-10-2010, 14:40
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Try changing it here:

Code:
Private Sub SetRegistrationOutline(s As Shape)
    With s.Outline
        .Width = 2 '<<<<<<<<<<change with in points here.
        .Color.RegistrationAssign
    End With
End Sub
-John
Reply With Quote
  #3  
Old 05-10-2010, 15:09
kunghel kunghel is offline
Junior Member
 
Join Date: Jun 2010
Posts: 27
Default

Ola John

I insert, but not work

the code is here:
Code:
Sub BoundingGuides()
    Dim x As Double, y As Double, w As Double, h As Double
    If Not CheckSelection() Then Exit Sub
    On Error GoTo ErrHandler
    ActiveDocument.Selection.GetBoundingBox x, y, w, h, False
    DrawGuides x, y, w, h
ExitSub:
    Exit Sub
ErrHandler:
    ShowError
    Resume ExitSub
End Sub

Sub BoundingGuidesWithOutline()
    Dim x As Double, y As Double, w As Double, h As Double
    If Not CheckSelection() Then Exit Sub
    On Error GoTo ErrHandler
    ActiveDocument.Selection.GetBoundingBox x, y, w, h, True
    DrawGuides x, y, w, h
ExitSub:
    Exit Sub
ErrHandler:
    ShowError
    Resume ExitSub
End Sub

Sub BoundingRectange()
    Dim x As Double, y As Double, w As Double, h As Double
    If Not CheckSelection() Then Exit Sub
    On Error GoTo ErrHandler
    ActiveDocument.Selection.GetBoundingBox x, y, w, h, False
    ActiveLayer.CreateRectangle2 x, y, w, h
ExitSub:
    Exit Sub
ErrHandler:
    ShowError
    Resume ExitSub
End Sub

Sub BoundingRectangleWithOutline()
    Dim x As Double, y As Double, w As Double, h As Double
    If Not CheckSelection() Then Exit Sub
    On Error GoTo ErrHandler
    ActiveDocument.Selection.GetBoundingBox x, y, w, h, True
    ActiveLayer.CreateRectangle2 x, y, w, h
ExitSub:
    Exit Sub
ErrHandler:
    ShowError
    Resume ExitSub
End Sub

Sub CropMarks()
    If Not CheckSelection() Then Exit Sub
    CropMarkForm.Show vbModal
End Sub

Private Sub SetRegistrationOutline(s As Shape)
    With s.Outline
        .Width = 1 '<<<<<<<<<<change with in points here.
        .Color.RegistrationAssign
    End With
End Sub

' ================================

Private Sub DrawGuides(x As Double, y As Double, w As Double, h As Double)
    ActiveLayer.CreateGuideAngle x, 0, 90
    ActiveLayer.CreateGuideAngle x + w, 0, 90
    ActiveLayer.CreateGuideAngle 0, y, 0
    ActiveLayer.CreateGuideAngle 0, y + h, 0
End Sub

Private Function CheckSelection()
    Dim b As Boolean
    On Error GoTo ErrHandler
    b = False
    If ActiveDocument Is Nothing Then
        MsgBox "No document is open", vbCritical, "Error"
    Else
        If ActiveDocument.Selection.Shapes.Count = 0 Then
            MsgBox "Nothing selected in current document", vbCritical, "Error"
        Else
            b = True
        End If
    End If
ExitSub:
    CheckSelection = b
    Exit Function
ErrHandler:
    b = False
    ShowError
    Resume ExitSub
End Function

Public Sub ShowError(Optional Location As Long = 0)
    Dim s As String
    If Location <> 0 Then s = " [" & Location & "]" Else s = ""
    MsgBox "Error: #" & Err.Number & " in " & Err.Source & vbCr & Err.Description & s, vbCritical, "Error"
End Sub
Am I do something wrong?

Thanks
Reply With Quote
  #4  
Old 05-10-2010, 15:27
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

HI.
It's in the form code, not the module.
-John
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
X3 Crop Tool problem gperzel General 4 01-10-2006 16:34
Crop Marks (Yet another thread...) Vyrsace General 3 06-07-2006 06:49
Bleed & Crop Marks cobrien11 General 2 28-06-2006 20:50
Crop photo tonywong General 1 18-05-2005 02:53
Custom crop and invert - Is this possible? geopig Corel Photo-Paint VBA 1 01-11-2004 13:28


All times are GMT -5. The time now is 03:19.


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