Osnap

Next
 From:  manz
1481.1 
Hi Michael,

Sorry to bug you again.

Just wondering if it is possible to set up a shortcut key to bring up the object snap window?

Regards,
Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.2 In reply to 1481.1 
Hi Steve,

> Just wondering if it is possible to set up a shortcut key to
> bring up the object snap window?

This one should do it:
code:
script:var cb = moi.ui.getUIPanel('moi://ui/CommandBar.htm'); moi.ui.showMenu( 'ObjectSnapMenu.htm', cb.document.body.lastChild.lastChild, 2, 0 );



Also another variation - this next version will bring it up as a dialog window that can remain open instead of automatically closing like the regular menu will do:
code:
script:moi.ui.createDialog( 'moi://ui/ObjectSnapMenu.htm' );


Hope this helps!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  manz
1481.3 In reply to 1481.2 
Hi Michael,

>>>Hope this helps!

It certainly does,

From the first script, I would of asked for possible toggle, but the second, which allows the window to remain, certainly a better option for me.
I know some would think that having this is not really needed, but it does help the flow, certainly for me.

Many thanks Michael,

Regards,
Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.4 In reply to 1481.3 
Hi Steve, I'm glad that works for you!

You may notice that there is an extra close button when it is used in dialog form.

You can get rid of that by editing (or copying to a new file and editing the new file) the file ui\ObjectSnapMenu.htm . There is a line in there that says <moi:FlyoutHeader />

If you remove that line, that extra close button at the top part will be removed.


Would you need this if you had the "only snap to visible" type functionality though?


It has been a general goal of mine to make it possible to leave the snaps either all on or temporarily turned all off, rather than having to switch on or off individual types...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.5 In reply to 1481.3 
Hi Steve, also it would not be difficult to tweak the dialog mode a bit, for example it could be thinned down by shortening some of the names and things can be re-arranged pretty easily into 2 columns if that would be better.

I've attached here a version that does that, it looks like this:



To install this one, unzip the attached ObjectSnapDialog.htm file, copy that to the \ui folder, and then update that shortcut to use this filename instead, then that will show this more compact version instead.

It's pretty straightforward if you look in the file, you can rearrange any of the <moi:MenuItem> tags that you want to move things around. If you edit the file you do need to close and then restart MoI before you will see changes.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.6 In reply to 1481.5 
One other note - just to make sure have you seen that you can right-click (or alt+left click) on those osnap menu items to quickly turn them all off except for the one you clicked on? And also a second right-click on one item will turn them all on.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.7 
One other idea - the version attached here is more compact yet:



This one leaves out Origin, Axis, Point, Perp/Perp and Tan/Tan - these ones just aren't as likely to get in the way. If you still need to turn them on or off you can go to the menu for that, but then the sticky one can have just the most frequently messed with ones on it.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  manz
1481.8 In reply to 1481.5 
Hi Michael,

>>>also it would not be difficult to tweak the dialog mode a bit, for example it could be thinned down by shortening some of the names and things can be re-arranged pretty easily into 2 columns if that would be better.

I did not like to ask, but you have done it already, excellent.

Many thanks,
Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  manz
1481.9 In reply to 1481.6 
Hi Michael,

>>>One other note - just to make sure have you seen that you can right-click (or alt+left click) on those osnap menu items to quickly turn them all off except for the one you clicked on? And also a second right-click on one item will turn them all on.

Yes, or I would of asked if there was a way to add that, it can save a lot of mouse clicking.

Thanks again,

Regards,
Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  manz
1481.10 In reply to 1481.4 
Hi Michael,

>>>Would you need this if you had the "only snap to visible" type functionality though?

No, I do not think I would need to change the snap settings with such an option.


>>>It has been a general goal of mine to make it possible to leave the snaps either all on or temporarily turned all off, rather than having to switch on or off individual types...

At the moment, I think it is more of habit from me. I am trying to adapt the way I work, so I can better use MoI.


Regards,
Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  co3Darts (CO3DPRINTS)
1481.11 In reply to 1481.4 
Hi Michael,

I'm using the dialog box version and wish to have the extra "x" close removed but I'm not able to find what is turning it on or off.

The string <moi:FlyoutHeader> Doesn't appear to be in the file at this point to be removed.

Thanks a bunch!

Jason
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.12 In reply to 1481.11 
Hi Jason can you post the file you're using so I can take a look?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  co3Darts (CO3DPRINTS)
1481.13 In reply to 1481.12 
>>You can get rid of that by editing (or copying to a new file and editing the new file) the file ui\ObjectSnapMenu.htm . There is a line in there that says <moi:FlyoutHeader>

Thank you.
Attachments:

Image Attachments:
Size: 35.5 KB, Downloaded: 52 times, Dimensions: 154x460px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1481.14 In reply to 1481.13 
Hi Jason, in your screenshot it looks like you're triggering the original object snap menu there, instead of the file you posted.

Please double check the keyboard shortcut you're using to launch it, and make sure it is using the dialog file and not the menu file, you will want it to be like this (note bolded part):

script:moi.ui.createDialog( 'moi://ui/ObjectSnapDialog.htm' );

Also the dialog file you posted has the controls arranged in 2 columns, if you want it in one long column like the menu you can copy the file ObjectSnapMenu.htm to ObjectSnapDialog.htm and then you'll find the <moi:FlyoutHeader> that was referred to previously which you can remove to get rid of the extra close button.

Hope this helps!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  co3Darts (CO3DPRINTS)
1481.15 In reply to 1481.14 
Ah hah, Thanks Michael.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All