Tell if snapping or rulers are on for a document
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.
Tell if snapping or rulers are on for a document
I am using your control in multi document view mode and I was wondering if there is a way to tell if the active document has snapping or rulers enabled so that I can modify my ribbon bar accordingly?
Thanks
Simon
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Tell if snapping or rulers are on for a document
Hello Simon,
Try getting "Measurement.Rulers.Visible" setting from IPXV_Inst.
Cheers,
Alex
Try getting "Measurement.Rulers.Visible" setting from IPXV_Inst.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Tell if snapping or rulers are on for a document
Thanks Alex,
I am doing the following, which works for the fine for the Rulers, but not for the Snapping as the e_pagesView_endLayoutChanging does not seem to fire when the snapping is enabled or disabled. Could you please guide me as to what event on should be using to capture the Snapping?
Thanks
Simon
I am doing the following, which works for the fine for the Rulers, but not for the Snapping as the e_pagesView_endLayoutChanging does not seem to fire when the snapping is enabled or disabled. Could you please guide me as to what event on should be using to capture the Snapping?
Code: Select all
If e.nEventID = nIDS(CInt(IDS.e_pagesView_endLayoutChanging)) Then
MISData.Instance.frmMain.btnShowRules.Down = Me.docPreview.Inst.Settings.Item("Measurement.Rulers.Visible").v
MISData.Instance.frmMain.btnEnableSnap.Down = Me.docPreview.Inst.Settings.Item("Measurement.Snapping.Use").v
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Tell if snapping or rulers are on for a document
Hello Simon,
The e_documentView_measurementChanged is fired in both cases.
Cheers,
Alex
The e_documentView_measurementChanged is fired in both cases.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Tell if snapping or rulers are on for a document
Thanks Alex,
This if fine for the initial controlling of the custom buttons on my ribbonBar, however if there is more than one document loaded then when the user tabs between them I need to set the buttons to reflect if the snapping is turned on. And as the snapping is document specific, unlike the rulers, then how would I do this?
I have done the following, but this is not picking up the specific document snapping settings:
Thanks
Simon
This if fine for the initial controlling of the custom buttons on my ribbonBar, however if there is more than one document loaded then when the user tabs between them I need to set the buttons to reflect if the snapping is turned on. And as the snapping is document specific, unlike the rulers, then how would I do this?
I have done the following, but this is not picking up the specific document snapping settings:
Code: Select all
If e.nEventID = nIDS(CInt(IDS.e_activeDocChanged)) Then
MISData.Instance.frmMain.btnEnableSnap.Down = Me.docPreview.Inst.Settings.Item("Measurement.Snapping.Use").v
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Tell if snapping or rulers are on for a document
Hello Simon,
From what I see, the setting itself is for the entire instance, though each of the documents hold it's own snapping settings for the current program instance. Will investigate further.
Cheers,
Alex
From what I see, the setting itself is for the entire instance, though each of the documents hold it's own snapping settings for the current program instance. Will investigate further.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Tell if snapping or rulers are on for a document
Hi Alex
Any update on this?
Thanks
Simon
Any update on this?
Thanks
Simon
Re: Tell if snapping or rulers are on for a document
Alex,
Any solution to this?
Thanks
Simon
Any solution to this?
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Tell if snapping or rulers are on for a document
Hello Simon,
Right now, the only way is to make a custom command handler for the cmd.view.snapGroup and other needed commands and listen to the OnGetItemState method.
Cheers,
Alex
Right now, the only way is to make a custom command handler for the cmd.view.snapGroup and other needed commands and listen to the OnGetItemState method.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ