Author Topic: BlackBox!!  (Read 11487 times)

0 Members and 1 Guest are viewing this topic.

Bhull1985

  • Guest
BlackBox!!
« on: April 24, 2014, 01:12:41 PM »
Hey BB,
Write me a .NET to do this:
When I shift+right click to bring up transparent osnaps and select the same one twice in a row, make the app auto-set snap to whichever I selected from the shift+right click.
Reset prev osnap settings/save first ofc
Do it with prompts that say which snap is turned on and when it's turned back off.

You're the man, challenge you!!!!!
(or just tell me how to do it in lisp lol!)

Just a request buddy, hopefully I wasn't too forward :P

Jeff H

  • Needs a day job
  • Posts: 6150
Re: BlackBox!!
« Reply #1 on: April 24, 2014, 01:22:32 PM »
While your at it

Let me borrow $100 and your wife for the weekend.

Thanks.


andrew_nao

  • Guest
Re: BlackBox!!
« Reply #2 on: April 24, 2014, 02:13:36 PM »
While your at it

Let me borrow $100 and your wife for the weekend.

Thanks.


lol

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: BlackBox!!
« Reply #3 on: April 24, 2014, 02:26:07 PM »
While your at it

Let me borrow $100 and your wife for the weekend.

Thanks.
Now THAT'S a challenge.


*brown chicken brown cow*
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #4 on: April 24, 2014, 02:27:54 PM »
Hey BB,
Write me a .NET to do this:
When I shift+right click to bring up transparent osnaps and select the same one twice in a row, make the app auto-set snap to whichever I selected from the shift+right click.
Reset prev osnap settings/save first ofc
Do it with prompts that say which snap is turned on and when it's turned back off.

You're the man, challenge you!!!!!
(or just tell me how to do it in lisp lol!)

Just a request buddy, hopefully I wasn't too forward :P





Why not just use CUI Editor to implement a custom double snap menu?
« Last Edit: April 24, 2014, 04:29:10 PM by BlackBox »
"How we think determines what we do, and what we do determines what we get."

GDF

  • Water Moccasin
  • Posts: 2081
Re: BlackBox!!
« Reply #5 on: April 24, 2014, 02:37:47 PM »
Or better yet, modifing the AxAcadStatusBarButton (Requires AcadStatButton.zip available from ManuSoft at http://www.manusoft.com.)
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #6 on: April 24, 2014, 03:25:35 PM »

Why not just use CUI Editor to implement a custom double snap menu?

Also worth noting, as I'm not the only one; I use Infrastructure Design Suite 2014, so have AutoCAD, Civil 3D, Revit, etc....



While AutoCAD will allow one to modify Mouse Buttons via CUI Command that references Menu, or Shortcut Menu, in my testing Civil 3D only recognizes the latter... When we first transitioned from Land Desktop 2009 to Civil 3D 2011, many users at my former employer mistakenly thought that modifying the Ctrl+Click functionality, etc. was locked out.

Today, I use the OOTB 'snap' menu for Shift+Click, and the 'double snap' menu for Ctrl+Click.
"How we think determines what we do, and what we do determines what we get."

tedg

  • Swamp Rat
  • Posts: 811
Re: BlackBox!!
« Reply #7 on: April 25, 2014, 11:42:01 AM »
Pretty impressive to have a thread title named after you...that's shouting your name.
All I can think of is your mother calling out the kitchen window "BlackBox, you get in here now!!!"
 
 :?
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #8 on: April 25, 2014, 11:51:01 AM »
Pretty impressive to have a thread title named after you...that's shouting your name.

That's kind of you to say, tedg :-); I'm flattered by the OP posing the challenge in the first place.

Cheers
"How we think determines what we do, and what we do determines what we get."

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #9 on: April 28, 2014, 02:50:52 PM »
Well I just figured if it would be anyone's cup of tea perusing these forums, it may be yours!
And I'm flattered to read the responses and will have to delve back into the CUI! I've used it extensively for menus of the dropdown variety, but short-cut menus not so much. Good to know that the CUI is capable of doing so since I've some familiarity with it.
Haha at the $100 and wives joke, I tried to add a note there at the bottom but I suppose it was just too much to resist :P
Regardless, neat! And thanks!

edit:
After a better look at the images you've attached I can already see that Center to Center will be very handy to add, as osnaps for placement are about 90% of what we've widdled down human interaction with some of these p&id's to LOL! This simple two clicks in one will be a relative huge timesaver, and learning where/how to place it for maximum usage will be the fun learning part! :D
« Last Edit: April 28, 2014, 02:54:15 PM by Bhull1985 »

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #10 on: April 28, 2014, 03:24:44 PM »
Cheers, dude.  :mrgreen:
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #11 on: May 06, 2014, 02:22:45 AM »
Hello BlackBox,

The double snap cursor menu is a great idea. Is it possible to show me how to create this in the cui?

Many thanks in advance, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #12 on: May 06, 2014, 08:24:01 AM »
Yeah, BBox...finally have some time to spend with this and I'm in the CUI but having time locating where I'd add these double-snaps....can you explain the procedure to create such a menu for us? Please and thanks

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #13 on: May 09, 2014, 09:20:51 AM »
What would be the command macro for 'nea to perp'?
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #14 on: May 09, 2014, 09:26:25 AM »
Hello BlackBox,

The double snap cursor menu is a great idea. Is it possible to show me how to create this in the cui?

Many thanks in advance, Robbo.

Yeah, BBox...finally have some time to spend with this and I'm in the CUI but having time locating where I'd add these double-snaps....can you explain the procedure to create such a menu for us? Please and thanks

Hi guys,

Sorry to keep you waiting; I'm having a pretty crazy week, but will get back to you on this.

Thanks for your patience. :-)



What would be the command macro for 'nea to perp'?

The CUI Command's macro would be:

Code - Auto/Visual Lisp: [Select]
  1. _nea \_per \
  2.  
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #15 on: May 09, 2014, 09:29:13 AM »
Thank you very much. I left out the last pause - that's why it didn't work!
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #16 on: May 09, 2014, 09:47:59 AM »
Hello BlackBox,

The double snap cursor menu is a great idea. Is it possible to show me how to create this in the cui?

Many thanks in advance, Robbo.

Yeah, BBox...finally have some time to spend with this and I'm in the CUI but having time locating where I'd add these double-snaps....can you explain the procedure to create such a menu for us? Please and thanks

Hi guys,

Sorry to keep you waiting; I'm having a pretty crazy week, but will get back to you on this.

Thanks for your patience. :-)

For the purposes of this example, we're going to assume that these CUI changes are being made to Main CUI.



The first thing I would do, is to decide what double snaps you want, and how you'd like them to be grouped.

With that outlined, in CUI Editor, you're going to be adding a new CUI Command (macro) for each-and-every-single double snap you desire, which is a good place to have some standardized naming convention, in order to make additions, and modifications especially, easy to find after the fact.

When creating these double snap CUI Commands, be sure to exclude the typical ^C^C prefix, as the intent here is to call these macros while in an active command, and you do not want to 'cancel' same.

Once you've created your individual double snap CUI Commands, you create a new Shortcut Menu, and give it an appropriate name. Make note of the Alias assigned to this new Shortcut Menu, you'll need that later. For this example, the Alias value is POP123.

To add CUI Commands to your new Shortcut Menu, in the lower left pane of the CUI Editor, select each of your newly added double snap CUI Commands, and drag them to your new Shortcut Menu. If you've named them so they're grouped together, multiple selection is easy. If not, well, perhaps you should reconsider that decision. LoL

With your double snap CUI Commands added to the Shortcut Menu, create another CUI Command which calls your Shortcut Menu's $P0=POP123 $p0=* macro.

Now, expand the Mouse Buttons node of the upper left pane.

For this example, we'll leave the Shift+Click as default Snap Menu. Now expand the Ctrl+Click node, remove the button assignments as desired, and ensure that either the top button assignment (button 2) is clear, or that you're comfortable with overwriting it.

Select your new Shortcut Menu's CUI Command, and drag & drop it on the Button2 Mouse Button.



This is merely a quick and dirty tutorial; I'll come back when I have time and dress it up with screen shots, etc.

Cheers
« Last Edit: May 12, 2014, 11:31:31 AM by BlackBox »
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #17 on: May 11, 2014, 04:46:06 AM »
Thank you BB. Very clear instructions to follow. My new shortcut menu is well on its way. Be interesting to see if I can get it to work with my Enterprise CUIx once complete.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #18 on: May 11, 2014, 10:43:50 AM »
Thank you BB. Very clear instructions to follow. My new shortcut menu is well on its way. Be interesting to see if I can get it to work with my Enterprise CUIx once complete.

You're welcome, ROBBO; I really should gather up the few good tutorials I've posted, and add them to my website. LoL

In any event, as to Enterprise CUI, what happened with this???

http://www.theswamp.org/index.php?topic=47009.msg520472#msg520472
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #19 on: May 11, 2014, 12:12:33 PM »

In any event, as to Enterprise CUI, what happened with this???

http://www.theswamp.org/index.php?topic=47009.msg520472#msg520472

I created a custom default right click menu in our custom Enterprise CUIx - P501, CMDEFAULT. Added a lisp in the Enterprise to run (menucmd "P501=MyEnterprise .CMDEFAULT") to replcace ACAD default. Also added a command to run (menucmd "P501=ACAD.CMDEFAULT")  to revert back to default in users ACAD.CUIx (and CIVIL.CUIx) if required.

I wouldn't want to discouraged users from customising their menus, etc. Therefore think the Enterprise CUIx approach is helpful and controlled centrally to help with our company standards and is easily setup and has the bonus of generally having precedence of any other cui loaded.

Cheers,  Robbo.

UPDATE: Added menu to Enterprise CUIx including Mouse Button assignments and unlike the default right menu, the ctrl+click in the Enterprise cui overrides the Main cuix  :-D.
« Last Edit: May 12, 2014, 03:41:18 PM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #20 on: May 12, 2014, 10:58:09 AM »
You're the man!
Now, time to read.

Alright was following steps pretty fluidly , not running into any issues until this happened, when trying to assign the newly created pop menu to a mouse button.
I tried re-sizing the panes and no luck, why don't I have the fields to assign pop to macro, as shown below?

(this is with Button2 selected, which has <none> next to it....what tha?!
« Last Edit: May 12, 2014, 11:10:30 AM by Bhull1985 »

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #21 on: May 12, 2014, 11:16:13 AM »
Alright was following steps pretty fluidly , not running into any issues until this happened, when trying to assign the newly created pop menu to a mouse button.
I tried re-sizing the panes and no luck, why don't I have the fields to assign pop to macro, as shown below?

(this is with Button2 selected, which has <none> next to it....what tha?!

Perhaps I left out a step by mistake :|....

Once you've created all of your custom snap CUI Commands, and properly linked them to your custom Shortcut Menu, then create another CUI Command which calls your $P0=POP### $p0=* macro... With that, you simply drag & drop this last Shortcut Menu CUI Command to Button2.
"How we think determines what we do, and what we do determines what we get."

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #22 on: May 12, 2014, 11:19:28 AM »
Aha!
Thanks!

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #23 on: May 12, 2014, 11:32:14 AM »
"How we think determines what we do, and what we do determines what we get."

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #24 on: May 12, 2014, 11:40:29 AM »
Yep, got them working quite well, you're the man BB!
Thanks for this nice tip.
Apologies for the redundancy but I wanted you to know I had this working as intended.

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #25 on: May 12, 2014, 12:41:50 PM »
Yep, got them working quite well, you're the man BB!
Thanks for this nice tip.
Apologies for the redundancy but I wanted you to know I had this working as intended.

No worries; I appreciate the kind feedback, and am glad to help bring your seemingly out of reach request to fruition with just a few short posts. :beer:

Cheers
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #26 on: May 14, 2014, 10:59:31 AM »
UPDATE: Added menu to Enterprise CUIx including Mouse Button assignments and unlike the default right menu, the ctrl+click in the Enterprise cui overrides the Main cuix  :-D.

If the shortcut menu and double snaps are added to a Partial Cuix, how can the ctrl+click in the partial cuix  take precedence over the default in the main cuix without editing the main menu group?

I tried (menucmd "A3=MyPartial.AUX3"), but menu was not reset.

Many thnaks in advance, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #27 on: May 14, 2014, 11:01:18 AM »
UPDATE: Added menu to Enterprise CUIx including Mouse Button assignments and unlike the default right menu, the ctrl+click in the Enterprise cui overrides the Main cuix  :-D.

If the shortcut menu and double snaps are added to a Partial Cuix, how can the ctrl+click in the partial cuix  take precedence over the default in the main cuix without editing the main menu group?

I tried (menucmd "A3=MyPartial.AUX3"), but menu was not reset.

Many thnaks in advance, Robbo.

Not sure that it can; I've only ever added these to a copy of the OOTB Main CUIx file used as our Profile's Main... Perhaps someone smarter than I will be along to educate us both.

Cheers
"How we think determines what we do, and what we do determines what we get."

Bhull1985

  • Guest
Re: BlackBox!!
« Reply #28 on: May 15, 2014, 08:49:25 AM »
Well it may be possible but logically the keyboard/mouse shortcut menus SHOULD belong with the main CUIX in use.

If you've got 3 enterprise CUIX's all with different keyboard/mouse shortcuts and assignments, that would be one very messy setup. Not even sure if it'd work.

However, by restricting this sort of enhancement to the main CUIX, it ensures that it will be available while you are in any session with that software/CAD.

If you need to transfer this onto multiple machines then what I would do is "transfer" (via the CUIX) the keyboard shortcut menu (double osnap) to your ENTERPRISE cuix. Then save the enterprise. Do not remove from your main ACAD CUIX. Just get a COPY of it onto the enterprise, and then reload the enterprise on other machines, and then transfer the menu back from the ENTERPRISE to their now main ACAD cuix (per each machine you'd add them to).

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #29 on: May 15, 2014, 08:55:30 AM »
However, by restricting this sort of enhancement to the main CUIX, it ensures that it will be available while you are in any session with that software/CAD.

FWIW - Main CUIx is a Profile-dependent component.



If you need to transfer this onto multiple machines then what I would do is "transfer" (via the CUIX) the keyboard shortcut menu (double osnap) to your ENTERPRISE cuix. Then save the enterprise. Do not remove from your main ACAD CUIX. Just get a COPY of it onto the enterprise, and then reload the enterprise on other machines, and then transfer the menu back from the ENTERPRISE to their now main ACAD cuix (per each machine you'd add them to).

It is for this reason, that I've historically worked in a production environment where both Main CUIx, and Enterprise CUIx (if included) are provided as part of our deployment, and in the case of Main, not mapped to the OOTB Main.

While the user does need to maintain write access to Main, we've always included a Custom CUIx as partial as part of our deployments. We can overwrite Main CUIx on user's accessible folders, and their Custom CUIx will still be loaded.
"How we think determines what we do, and what we do determines what we get."

ROBBO

  • Bull Frog
  • Posts: 217
Re: BlackBox!!
« Reply #30 on: May 15, 2014, 09:05:44 AM »
Bhull1985,

I have done a similar thing - apart from the last step. Have a script to run to set up other users with the enterprise cuix. The shortcuts and Ctrl+click appears to override the main cuix and work from the installed custom enterprise cuix fine and as expected. This is kept in central location, so updates are automatic for others.

The only reason for enquiring about partial cuix loading in the shortcuts is because sometimes we use third party software loaded into AutoCAD which can have a Enterprise cuix associated with them. I believe only one enterprise cuix is allowed. I have a separate desktop icon with a switch for a different profile and load in the enterprise cuix as a partial cuix in this instance.

Thanks, Robbo.
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

BlackBox

  • King Gator
  • Posts: 3770
Re: BlackBox!!
« Reply #31 on: May 15, 2014, 09:21:29 AM »
... I have a separate desktop icon with a switch for a different profile and load in the enterprise cuix as a partial cuix in this instance.

This thread may be of interest, particularly post #11.
"How we think determines what we do, and what we do determines what we get."