AutoCAD VB :: Set Focus From Page1 To Page2 By Clicking Command Button?
Jun 27, 2006How do I set the focus from page1 to page2 by clicking a command button?
View 4 RepliesHow do I set the focus from page1 to page2 by clicking a command button?
View 4 RepliesHow does one programmatically set the command line to have keyboard focus?
I'm programmatically setting an active/focused PaletteSet's visibility to false.
_paletteSet.Visible = false;
I would like to follow this line with code that sets the command line to receive focus.
The PaletteSet for other reasons has KeepFocus = true.
I've tried various Win32 APIs (SwitchToThisWindow, SetForegroundWindow, SetActiveWindow) to no avail. I also tried SendCommand() and SendStringToExecute(activate=true,..) , etc.
I imagine there's a way to do this with the native APIs.
"The Focus icon updates to show the same type of property belonging to any element you select (hence "focusing" on the type of property). For example, if you display the Light property of a spotlight and then select a point light, the property editor is updated to display the Light property of the point light. However, if you then select a geometric object, the property editor is not updated".
Testing this out, it does not seem to work. Even when the focus icon is depressed it refreshes if I select a different type such as a mesh object after a light.
I have a simple scene set up to test it. A point light,a spot light and a cylinder. Basically the scenario in the description. It always refreshes in focus mode. Clicking on the mesh always gives me the mesh properties rather than sticking to the light properties which was selected first and Focus button depressed. Or clicking on a null also shifts to the null properties.
I am occasionally developing with ObjectARX 2013. The problem: A command being executed from a document needs to focus on another document. I am doing that as:
Application.DocumentManager.MdiActiveDocument = aGeneratedDrawing;
After this line, the focus is taken by the other document. But the command execution just stops without producing any visible error or catchable exception. Apparently, the document focus cannot be changed during execution of a command.
A solution: What worked in the end was displaying a .NET form inside the command, like:
Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(aForm);
Then, performing the very same set of actions on a button click works flawlessly.
The question is: can using the form as a mediator be avoided? It is redundant there. I tried hooking to CommandEnded, executing the code as a separate command via Application.DocumentManager.MdiActiveDocument.SendStringToExecute, and also executing the code in a separate delayed thread. So far, only triggering the code via the form worked.
When I click the Escape button, All the selection events are stopped working. Please follow the steps below reproduce.
1. Create the Select Events Object using the following steps.
m_pCommandManager->CreateInteractionEvents(&m_spiInteractor);
m_spiInteractor->put_SelectionActive(VARIANT_TRUE);
hr = m_spiInteractor->get_SelectEvents(&m_spiSelectEventsObj);
m_spiSelectEventsObj->put_Enabled(VARIANT_TRUE);
m_spiSelectEventsObj->PutWindowSelectEnabled(VARIANT_TRUE);
[code]....
2. Open the part and Select any face in the model.
I get the following event.
STDMETHODIMP CSelectionEventHandler:nEvent_OnSelect(ObjectsEnumerator * JustSelectedEntities,SelectionDeviceEnum SelectionDevice, Point * ModelPosition, Point2d * ViewPosition, View * View )
3. Now click on the Escape button. Now if you try to select any face , no call back is received.
I am developing a custom toolpalette, with a toolstrip and buttons on it. The botton asks user to select a point on the screen. But when the button is pressed it gets focus and tu user has to first click on the screen first to activate it and another click to select the point.
BringWindowToTop(Acad.HWND32)
BringWindowToTop(Doc.HWND32)
BringWindowToTop(Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Handle.ToInt32)
[Code]....
Windows 7 (x64)
AutoCAD 2012 (x64)
Long, long, keyword hierarchy. Clicking on a keyword takes the focus back up to the keyword filter box. Usually happens if I've used the filter box to narrow down the keywords that are visible. Continues even after the filter box has been cleared. Doesn't happen all the time though. It is a real pain when trying to double click a keyword to edit it as the first click or the double click causes the list to refresh showing only the top entries. The second click (of the double click) then causes whatever keyword is now under the pointer to be keyword to be edited - NOT the keyword under the pointer when I started the double click.
I've seen this happen in both LR3.0 and LR3.2RC.
Windows XP, 32bit.
After copying a value in clipboard like "1566.78" when I want to draw a line while my cursor is on my drawing space I write "0," and then hit "Ctrl+v" it draws line point on "0,1566.78". But this is not working fine in my home Cad, When I draw a line in same procedure and when I hit "Ctrl+v" after writing "0," it pastes the value "1566.78" as a text.
To do this right I have to click on command line to draw a point but in office I don't have to click on command line. I also import the office profile *.ARG in home Cad but still not working.
When I open Lightroom 5 and click the import button I notice that the thumbnails that appear are not of the same size.
Why?
1) The phots are all 6x6 square
2) The photos are all TIFF format
3) The photos are of similar size approximately 136 MB each
See capture of my screen as opened in lightroom 5.
I have made a pause and a play button to my slideshow.The pause button is just a boks with the click-action code:
sym.$('btn').click(function(){
sym.stop();
});
The pause button is a boks with the click-action code:
sym.$('btnPlay').click(function(){
var timelinePos = sym.getPosition();
sym.play(timelinePos);
});
It works but in the beginning, I have to click twice before the function works. It is only the first time. After that everything works fine.
I have an animation with 5 different parts. I would like to trigger a random part when clicking on a button.
In order to do that I put labels on all parts (play1,...,play5). Then I put a code on the button on the click event :
var RandomNb=Math.floor(Math.random()*5)
if(RandomNb=1){sym.play("play1");}
It is just a simple test but it does not work : the animation play1 is always played no matter the value of RandomNb. I obviously make something wrong but I don't know what...
how can I get a Random Number in a Text by clicking a button?
For example: I have an already animated object [a dice] as button and I have a Text object located on other part of the stage and where should appear the random number from 1 to 6.
I have tried in CreationComplete and compositionReady, and in the Click option in the button, one of these two options:
Math.floor((Math.random()*6)+1);
var ran_number=Math.floor(Math.random()*5;
I have also tried in the dice image [button] within the symbol this [with one of the two previous codes]:
sym.getComposition().getStage().$("text").html(ran_number);
And it doesn't work anyway. Right now I'm basically lost. That would be like:
1.- start your computer.
2.- open Edge.
i have a problem with an animation in Edge Animate. I try to animate a button which spins 45° on mouse over and back on mouse out. So far no problem. Now i want the button to spin 90° when i click on it and let it stay on this position. I made it spin the 90° but it always spins back on mouse out because the event is still there. Is there any possibility to delet the mouse out event or pause it after clicking on the button. I already tried remove it but without any sucess.
View 4 Replies View RelatedI'm building a custom action and it would be great if I could record clicking the layer eyeball off.
Is there a menu command equivalent for turning current layer visibility off?
I have created a dll that I can run from the command line just fine. However, I have been asked to do the following:
When the user opens a drawing a button will appear. When the user clicks on the button the command contained in the dll will be executed.
I don't know how to do this and haven't been able to find much on this. I am using AutoCAD 2011.
How i can open an existin drawing from a button or pull down? I need the script
View 4 Replies View RelatedI'd like to know if it is possible to create a custom button with existing command in inventor.
View 1 Replies View RelatedI'm trying to find out how to assign to a toolbar button the open command for a specific drawing.
The code I input at the cui is ^C^COPEN;"//server/subpath1/subpath2/legend.DWG";
The answer I get is
Command: OPEN
Command: //server/subpath1/subpath2/legend.DWG "
Unknown command "DWG"". Press F1 for help.
I loaded 2013 Civil 3D and I customized my Ribbon with Zoom Commands I use frequently; everything looked fine...I changed the Workspace to Planning & Analysis and cutomized my Ribbon to include the Zoom Commands but a Button Icon for ZOOM_TO_POINT came up with a cloud & question mark. I went to look for the Icon Image & I don't see it. I made the mistake of changing the Icon to another hoping I could change it back but it's not there. I went to the 2012 verison & the Button Icon is there...first icon listed. Where are the icons in 2012 so I can drag & drop image into 2013?
The icon has a point symbol with a magnifying glass. I've checked other computers and the same thing. Can't find the Image Icon for ZOOM_TO_POINT. It shows up when you load the software but if you want to edit it...it's not there in the CUI Button Icons.
On some computers with AutoCAD 2013 SP2, pan and zoom launched with the middle mouse button is significantly slower than pan and zoom performed by launching the PAN or ZOOM command on the command line.
View 7 Replies View RelatedI am developing Addin for inventor in C#.
I have added single panel in my new ribbon tab. This panel contains a single button.
When user clicks this button then a dockable window is invoked.
Now I want to insert 'Exit' Panel(and "Finish" button in it) to kill the above dockable window.
e.g. If we switch on sketch mode then to exit from this mode the 'Finish' button is there in all tabs of ribbon
(As shown in below image)
I want to use this behaviour in my addin.
Is there any API to add this 'Exit' panel to terminate from any button command or do we need to add it ourselves?
how can I assign on button "F1" command ? I no need help on F1.I need F1 - Perspective View, F2- Top..
View 9 Replies View RelatedI am growing increasinly frustrated. I just installed AutoCAD LT 2013 on my laptop. I managed to get everything customized the way I want, except the button icons on my (classic) toolbar are much too small. If I go into the menu and select 'use large icons', they are too huge. My screen resolution DOES NOT need to be changed or adjusted. I went to the help menu to see what I can do, and found that I can go into CUI and adjust the size of the button icons that way, via the button image editor, however there is no 'button image editor' dialog box when I select any given toolbar command.
View 1 Replies View RelatedIn this lesson we will consolidate code to prevent code reuse. Follow along as we demonstrate by doing the following and more:
Apply a color to a form command button, loop form controls, and save and get the color from registry
Part 2 of 7
cs_setInnerHtml('video_43f4e134-ee93-489d-ba2f-80042d243821','');
[URL]
how I could force a modeless form to keep focus. There is a sample on the ObjectARX docs but I can find anything for Dot Net.
View 3 Replies View RelatedI have a VBA program that I'm converting to VB.Net. The program is a batch process that opens a an excel file, opens a template drawing, adds blocks (listed in the excel file), plots and saves the drawing, then moves on to the next drawing, and so on. In Autocad 2008 and previous version, the program ran in the background, i.e. I could see what was happening, but it didn't affect the running of other programs (like email). However, since switching to Autocad 2009 (and 2010, and now 2011), the very same program now steels focus every time a new drawing is created (every few seconds). We've been running this program for years during normal business hours, but have had to change to running them on a remote VM (which is slower) or at night.
I have since converted the program to vb.net, but I get the same results; windows or autocad keeps returning the focus to the autocad interface. When I originally started to covert this program, I was going to do everything in the database only (not the user interface), it appears that to plot, though, the drawing must be opened in the interface.
I can still run the same VBA program in 2008 or 2007 (if I re-install them) and it will run without steeling focus, but the 2007 file format is slightly larger and adds up with the thousands of drawings we are dealing with. And I want to move to vb.net and 2011.
How to switch focus to AutoCAD document window from my form of C# .NET plug-in.
After user pressed the button, I invite him to input a point, but my form still on top.
And it is nessesary to press minimize button, next to set a Focus on Autocad window, then to pick a point.
It is not handy enough.
I did not find a property to set a focus in class of Application.MainWindow.
Ever tried filleting a model and noticed this annoying behavior. You want to type in 0.25... So you typed 0 first, then typed point, then 2. You are now going to type the remaining part 5. You notice that 5 replaces all the numbers in the dialog box. All of a sudden now inventor thinks the fillet value is 5.
Bad part is that this is a huge casting model and 5 is too big and inventor is now frozen.
Inventor Professional 2013
Vault Collaboration 2013
When i use standard Acad-functions or even simply select an object like a polyline from land-survey,the "ribbon" changes to the corresponding Topic of the object,and the Map3D window looses its focus. (normal windows-mouse-cursor is displayed, not the AutoCAD crosshair). After clicking in Map 3D window again, crosshair reappears,and work can continue.
It doesn't matter if Map3d-windows is in windowed mode or fullscreen,it also doesn't matter if the windows is only on one of my 2 monitors or on both.
didn't have this problems using Topobase Client 2009,2010,2011...but since 2012 few problems evolved... (drawing-order-bug, memory-leak problem etc. etc.)
I have a .psd file that was created by someone else for my friends web page. The psd file is the background, logo, and navigational bar for her home page. Each button is a "slice" I think because there are lines around each button on the left side navigational bar (not a true navigational bar just created by buttons) and around the head and body etc. (The lines are blue if that tells you anything - each section is numbered with a little tiny icon that looks a little like the back of an envelope.)
My question - we wanted to change the word on one of the buttons - I did that saved the psd file - no problem. Then I cropped out the button that we had changed. When I saved it to the web (as a jpg) the button looks like a button (a box around it - not a line a raised area that looks like a button.) The other buttons do NOT look like a button (even though the layers are named buttons.)
How can I change it so it looks flat (not button like) like all of the rest of the items on the navigational bar.
As default the Wacom pen top button acts as the right button. Is there a way to assign the right button to the bottom button?
Smoke 2013 Ext1
17" Mac Book Pro
OS X 10.8.5
16 GB RAM