We've been trying to modify the Snap to Object settings but it appears that the Editor doesn't actually use the new settings. Do we need to fire an event or something after changing the flags? If we do need to fire an event how do we do that since it appears that the Event.ID is read-only?
I was testing this in VB6
Call PDFEditor.Inst.Settings.SetInt("Measurement.Snapping.Objects.Flags", lFlags)
I can open the Preferences dialog and it displays the proper settings but again the Editor still uses the original values for the which objects it snaps to. I even tried toggling the commands on and off both ways. The only way it will start using the new settings is if I open the Preferences Dialog then the Measurements->Customize and check and uncheck one of the object settings and apply it.
'Toggle Object Snapping on and off
Call PDFEditor.Inst.ExecUICmd("cmd.view.snap")
Call PDFEditor.Inst.ExecUICmd("cmd.view.snap")
'Toggle Object Snapping on and off
Call PDFEditor.Inst.ExecUICmd("cmd.view.snaptoObjects")
Call PDFEditor.Inst.ExecUICmd("cmd.view.snaptoObjects")
'Use settings to toggle on and off
Call PDFEditor.Inst.Settings.SetBool("Measurement.Snapping.Use", False)
Call PDFEditor.Inst.Settings.SetBool("Measurement.Snapping.Use", True)
Call PDFEditor.Inst.Settings.SetBool("Measurement.Snapping.Objects.Use", False)
Call PDFEditor.Inst.Settings.SetBool("Measurement.Snapping.Objects.Use", True)
Unable to get the SnapToObject Settings to take effect SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Unable to get the SnapToObject Settings to take effect SOLVED
Hello RMan,
Please try firing this event after the settings change:
Cheers,
Alex
Please try firing this event after the settings change:
Code: Select all
pdfCtl.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_Measurement);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Unable to get the SnapToObject Settings to take effect
Works Perfect!!! Thanks so much Sasha.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17906
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: