OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 24-03-2011, 02:00
Posts: n/a
Smile User input GUIDELINES

Hi, I have a question

Is there a macro out there that can do the following?

I have a line: lets say at 13 degrees. I want to be able to make a guide line based on 2 user inputs that will set the creation point of the guideline based on the first input, then set the center of rotation of that guide line based on the input. After the macro asks for the second input it creates the guide line from point A to point B with rotation relative from point A to point B.


David B.
Reply With Quote
Old 24-03-2011, 06:48
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811

It's probably to early but I don't understand completely.
Here's a sub that will create a guideline based on 2 clicks. Snap is enabled in the script.
You should be able to calculate an offset distance from the click points if needed.

Public Sub clickForGuide()
    Dim x1#, y1#, x2#, y2#, d#
    Dim Shift As Long
    Dim a As Boolean, b As Boolean
    Dim bSnap As Boolean

    If ActiveSelection.Shapes.count = 0 Then
        bSnap = True 'enable snap
        a = False
        b = False
        a = ActiveDocument.GetUserClick(x1, y1, Shift, 10, bSnap, cdrCursorEyeDrop)
        If Not a Then
            b = ActiveDocument.GetUserClick(x2, y2, Shift, 10, bSnap, cdrCursorEyeDrop)
        End If
        If Not b Then
            ActivePage.Layers(0).createGuide x1, y1, x2, y2
        End If
    End If
End Sub
Reply With Quote
Old 24-03-2011, 07:56
Posts: n/a

Thank you. I will test it out and let you know if its what I am looking for
Reply With Quote
Old 24-03-2011, 07:59
Posts: n/a

PERFECT , Thanks
Reply With Quote

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
Document Center Guidelines PAnderson CorelDRAW/Corel DESIGNER VBA 11 15-01-2011 19:17
Select Guidelines macro kenpoist CorelDRAW/Corel DESIGNER VBA 5 05-01-2011 13:12
How do i print the guidelines? cristov General 3 26-02-2006 22:49
Snap to guidelines ddonnahoe CorelDRAW/Corel DESIGNER VBA 2 22-11-2004 12:21
CD11: Adding input from user form to document ddonnahoe Code Critique 2 09-04-2004 12:43

All times are GMT -5. The time now is 10:46.

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