OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-08-2012, 16:10
ajc200 ajc200 is offline
Junior Member
 
Join Date: Aug 2012
Posts: 2
Default Visual basic, snapping

Hello

I originally posted this question at the Corel user forums but it was suggested that it may be better here if anyone may be able to help.

I am trying to emulate something similar to the Corel Designer behavior in which a keypress can be used to enforce a particular type of snapping. This doesn't seem possible in Corel Draw and as a workaround I hoped to write several VBA scripts to allow toggling on and off the components of snapping.

I've found that I can toggle snapping to grid using

Application.ActiveWindow.Document.Grid.Snap = Not (Application.ActiveWindow.Document.Grid.Snap)

and assigned this macro to the letter G. I would now like to write additional scripts to turn on Quadrant snapping (Q), midpoint snapping (M), tangent snapping (T) and so on, but I am having trouble locating the appropriate code in the VBA object model. Can anyone help point me to this? I'm imagining something like

Document.SnaptoTangents = True
Document.SnaptoMidpoints = False
etc.

i.e. I am hoping to find a way to set the values within View, Setup, Snap to Objects dialog box (Modes section) using code

Many thanks if anyone is able to help !
Reply With Quote
  #2  
Old 12-08-2012, 10:53
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Snapping

As for as I know this settings are not accessible. They are saved to the registry upon CorelDRAW closing, but you would have to make your changes and reset CorelDRAW for them to be picked up, don't think that is a good solution.

-Shelby
Reply With Quote
  #3  
Old 15-08-2012, 17:07
ajc200 ajc200 is offline
Junior Member
 
Join Date: Aug 2012
Posts: 2
Default Thanks

Many thanks for your help in confirming this !
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
Help needed using Visual Editor Snoman SecuriDesign 0 26-01-2011 03:42
Urgent Help: Alex: with Corel VBA and Visual basic program amollondhe CorelDRAW/Corel DESIGNER VBA 1 23-11-2006 08:57
Visual Basic 2005 shelbym CorelDRAW/Corel DESIGNER VBA 5 03-11-2006 21:30
Visual basic and text box Mark Hockert CorelDRAW/Corel DESIGNER VBA 0 08-06-2006 14:19
Curveworks Fillet Gives Visual Basic Error wetpuppy CurveWorks 2 05-08-2005 10:08


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


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