AutoCAD .NET :: Changing Document Focus While Executing A Command

Sep 30, 2012

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.

View 4 Replies


ADVERTISEMENT

AutoCad :: Losing Zoom By Executing The Plan Command?

Dec 6, 2013

when i work on geometry which is not in orthographic orientation i always prefer to create orthographic view of this, that's what i do :

Command : ucs
Command : z
Command : (selecting representative angled 2 points)
Command : plan
Command : c

than the whole zoom is lost , and i need to find again the portion , and save a view. i want to automate this process but before i automate it i want to know if there is a way to avoid zoom lost after executing the (plan) command?

View 7 Replies View Related

AutoCAD Inventor :: Prevent User To Start Other Command While Executing A Macro

Feb 21, 2013

I have a macro that automatically creates a Detailed view on a sheet. It works on 2 input's:

- mouse click 1 (set's the target to be detailed)

- mouse click 2 (set's the location where the balloon should be)

The code works fine. But sometimes the user will start another command, or restart the same command, while it is still running. This off course gives all kinds of problems.

Is there a possibility in VBA to prevent the user to start another command while this command is running?Or is this problem a part of the clicking itself?

Here is my (it uses a Class Module called: clsGetPoint, see code below)
Sub AutoDetailedView() On Error GoTo ErrorManagment '(error handling 2013/02/18) 'step 0 Create a transaction. -> for 1 undo command Dim oTransMgr As TransactionManager Set oTransMgr = ThisApplication.TransactionManager Dim oTrans As Transaction Set oTrans = oTransMgr.StartTransaction(ThisApplication.ActiveDocument, "AutoDetailedView") 'step 1 Select a drawingView 'Set a reference to the drawing document. Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument 'Set a reference to the active sheet.
[code].....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Executing Command If Find File Returns NIL

Dec 17, 2012

Im having a little trouble of late understanding how to undertake an action/ command if nil

what i do know id the following:
 
(setq TESTvar(findfile "acad.lsp"))(alert TESTvar)

this gives me the path of the acad.lsp, that is provided it actually exists, however because the acad.lsp is not compulsory  it may indeed not exist meaning that the command prompt would return the NIL value instead of the pathname.

based upon that I would like to create a new acad.lsp file if not found by autocad.

View 3 Replies View Related

AutoCAD .NET :: How To Force Command Line Focus

Jun 28, 2012

How 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.

View 4 Replies View Related

AutoCAD VB :: Set Focus From Page1 To Page2 By Clicking Command Button?

Jun 27, 2006

How do I set the focus from page1 to page2 by clicking a command button?

View 4 Replies View Related

AutoCAD .NET :: How To Stop Changing Active Document

Jan 24, 2013

How can I stop changing active document? I was thinking I could use this, but I don't know how to cancel it in the event handler:
 
AcadApp.DocumentManager.DocumentToBeActivated += new DocumentCollectionEventHandler(DocumentManager_DocumentToBeActivated);static void DocumentManager_DocumentToBeActivated(object sender, DocumentCollectionEventArgs e){ // Messagebox to ask if user are sure bool AreYouSureYouWantToChangeActiveFile = MessageBox.... if(!AreYouSureYouWantToChangeActiveFile) //cancel change active file somehow...???}

View 6 Replies View Related

AutoCAD Inventor :: Units Command Under Document Settings?

May 21, 2012

Where did they put it in IV 2013?

View 9 Replies View Related

AutoCAD Map 3D :: Executing Query During Zoom

Mar 31, 2010

I have a county wide aerial image in jp2 format, connected through Data Connect and every time I pan or zoom it says "executing query". It is very slow getting around in the drawing (tracing over tree line, roads, etc.). I have a Windows 7 64-bit machine with 6 GB of RAM. Is there a setting I can turn off to make zooming, panning, changing layouts, etc. faster?

View 3 Replies View Related

AutoCad 2D :: Method For Changing The Size Inside The Command?

Dec 6, 2012

Is there a method for changing the size inside the command?

View 9 Replies View Related

AutoCAD .NET :: Executing Intersect With Between Polylines And Lines

Nov 25, 2013

I have a problem while executing intersectwith between polylines and lines

the polyline execute intersectwith method referencing a line object with expandboth parameter value but sometimes , the intersection is not found

when using expandthis or expandargument values, I have no problems

I'am using VS2012 express and Autocad 2014

the attached project containt :

  an image (result;png) showing my result

  a dwg file (dessin3.dwg) , it is my test file

  the source code for testing , (test" command)

it find all polylines and all lines in the drawing , compute the intersections between each couple and draw a dbpoint on each

View 3 Replies View Related

AutoCAD Architecture :: Changing Primary Command Ribbon Panel

Aug 23, 2012

What's the best way to change the primary command on a ribbon panel?  I want to set Pline as the primary command on the draw panel as it is currently line.  I've managed to get it to work (sort off) but shouldn't it as simple as right click "set as primary command"?

View 4 Replies View Related

AutoCad :: Changing Layer Colours Within Viewports At Command Line

Apr 10, 2012

I am producing some floor plans which I am having to split into several sheets. I am reusing the overall plan in small scale as a key/location plan (in a seperate viewport).

As the viewport is at small scale I want to make the pens thinner so walls don't come out too thick so I go into the layer manager and change the viewport pen colours and freeze off unwanted layers. Trouble is although I can copy the viewport between sheets and drawings it won't remember the layer settings is there a way that I can either: Set a variable to remember the layer settings within the viewport when copying Write a script to change the layer colours within the viewport and vp freeze the unwanted layers so all the keyplan match between all of my sheets.

The script wouldn't be too much problem for me as I mostly use key commands but when I tried changing the layer colours using -la -> c -> red all the viewports changed not just the current one. Is there a different command to change the viewport colours or is it just not possible from the command line.

View 2 Replies View Related

Photoshop :: Changing The Contents Of A Document

Nov 18, 2005

I have uploaded a document in JPEG format.I want to change the contents of the document.Please let me know which is the simple way of doing it.

View 4 Replies View Related

AutoCAD 2013 :: Floating Command Line Width Changing On Open

May 1, 2012

[URL] ......

Floating command line width gets shorter and shorter everytime you open up AutoCAD?  Civil 3D is real bad, I used it to shoot the above video.  In regular AutoCAD, it still shrinks, but it shrinks a lot less.

Any tips for keeping it floating but making the width stay constant?

View 7 Replies View Related

Photoshop :: Cropping Is Not Changing Document Size

Oct 3, 2013

I have a photo 36" x 24". I have cropped to 18.5 x 12.5" yet the document size remained  the same. Now when I go to print on 13" x 19" paper, only a portion prints because the photo is too big. I shouldn't have to "scale" as then I have no way of confirming that it really will print to the crop dimensions.
 
Since upgrading to CS6, I have had issues with how the crop is done. For example, why when I open a photo in CS6, the crop tool is already selected by default?

View 4 Replies View Related

Photoshop :: Changing Percentage Of Document Opacity Or Zoom?

Jul 25, 2013

sometimes when trying to manually input the percent number for either layer opacity or image zoom, when I try to type a number I just get a DING sound and it wont allow me to do anything. It goes away after I click a bunch of random things, minimize photoshop and then open it up again. Why does it do this? All I do is click on the percent number, try to input a new number but it sometimes just doesn't allow me to do so. I check all around the document to see if there is anything going on that may interfere but I notice nothing. What is it trying to tell me when it just dings and refuses to change the numbers?

View 2 Replies View Related

AutoCAD Inventor :: 2014 Crashes While Executing Revision Table Edit?

Dec 21, 2013

Inventor 2014 crashes when executing revision table edit. This started after installing windows 7 SP1(x64) and SQL server 2012 express (x64). 

View 1 Replies View Related

AutoCad 2D :: Command To Bring Back Option Of Changing Visibility States On Previously Placed Blocks

Sep 6, 2012

I have a drawing with several dynamic blocks (over 1000 block references) with visibility states. I recently noticed that all of the blocks no longer have the option to change the visibility state (i.e. the upside down blue triangle no longer appears when clicking on the block).

If I insert a new block it comes in with the option to change the visibility state. However, the previously placed blocks still do not have the option of changing the visibilty state. Even if I update the definition of all block references in my drawing nothing changes with the previously placed blocks.

Is there an option/command to bring back the option of changing visibility states on my previously placed blocks?

View 2 Replies View Related

Photoshop :: How To Save A Document That Has Adjustment Layers Without Changing The Appearance

Nov 16, 2013

Basically I am making a new pattern of stars, so I created a 1000 by 1000 document, filled with black, added noise, then added an adjustment layer to thin out the noise and make it look like stars in space. It looks great!

How to save it without the effect changing. I tried flattening the image, and it messed up how I wanted it to look. I tried merging visible, that didn't work. I tried just saving it as a PNG, like I do with all my projects, but that didn't work. And defining a pattern did the exact same thing. I just want to have what I physically see on the screen save as is so I can use it with other things.

View 4 Replies View Related

CorelDRAW Graphics Suite X5 :: Changing Document Color Profile

Jul 24, 2011

Is it possible to change the color profile of a document after you've created it?

View 2 Replies View Related

Illustrator :: Changing CS3 AI Default Startup Document In Mountain Lion?

Mar 17, 2013

Everything you read says that to change the default AI (CS3) startup document you use this path:
 
Users >  (User Name) > Library > Application Support >  Adobe > Adobe Illustrator CS3 > New Document Profiles > *.ai
 
The problem is, under Mountain Lion that path doesn't exist.  When I go to my user name, there is no "Library" folder at all.  Under "Shared" there is an AI Library folder, but it has nothing of any value in it.
 
My AI startup document (that I've been using for ages) is found here:
 
HD > Applications > Adobe Illustrator CS3 > Plug-ins > filename.ai
 
However, if I navigate there and make changes, then quit Illustrator and re-launch it, nothing happens.  I'm using the same old defaults as before. I know I need to upgrade to a later version of CS, but the prices have become so outrageous there's no way I can justify it as long as AI and PS are working.  You need a mortgage to buy new Adobe products these days.

View 3 Replies View Related

AutoCAD Inventor :: 2014 - Change To Integer Compile Passes But Fail On Executing

Jun 30, 2013

SurfaceBody.GetExistingFacets( ToleranceIndex As Double, VertexCount As Long, FacetCount As Long, VertexCoordinates() As Double, NormalVectors() As Double, VertexIndices() As Long )

This works fine in VBA (Inventor 2014). But when I start using the same in VB.NET (VS 2012) all declaration as long shows as integer and fails on compiling. If I change to integer compile passes but fail on executing in Inventor 2014.

View 6 Replies View Related

AutoCAD Inventor :: Sheet Metal ILogic Rule Not Executing On Non-rectangular Base Sketch?

Aug 5, 2013

I have a template that I have created, in it I have a rule that changes the stock number and description based on which sheet metal rule is selected.   The weird thing is it works correctly if the first sketch is a rectangle.  If you sketch a circular shape and make that the face it will not work.  It blanks out the values for the stock number and description.  

I'm running Inventor 2014 update 2.

Format:HTML Format Version:1.0 StartHTML:     165 EndHTML:   33212 StartFragment:     314 EndFragment:   33180 StartSelection:     314 EndSelection:     314
SyntaxEditor Code Snippet
DimiPropValAsString=""
DimiPropDesAsString=""
SelectCaseSheetMetal.GetActiveStyle()

[code]...

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Macro Parameter Contains Space (changing Layer Color From Command Line)

Sep 19, 2013

I'd like to change a layer's color from command line because of a user icon. I figured out from previous topics that I should use macro similar to this: ^C^C_filedia;0;-la;s;Verdeckt (ISO);c;1;l;dashed;;_filedia;1;re;

(I want to use this macro to change layer's linetype, too, but that's not the point)

The only problem with this macro: layer's name contains a space therefore Autocad tries to recognize Verdeckt as a command (and macro interrupts there) instead of setting Verdeckt (ISO) as the current layer. I've tried using different quote marks, none of them worked (' and " and <>). I hope there's a method for entering a parameter that contains space.

Software: Inventor Series 2011 SP1 x64
OS: Vista Business x64
CPU: E6400
RAM: 2*2Gb GeIL
VGA: Quadro FX 550

View 5 Replies View Related

Photoshop :: Edit Some Random Commands Before Executing Them

Jan 26, 2013

PS not letting me edit some random commands before executing them, including Duplicate, Fill, Print Preview, Stroke...possibly others I haven't discovered.  When I click the dropdown choice, an edit window used to let me tailor pixel widths, color, etc. (I know, [it's what] 'edit' means). Now, the little eyedropper icon replaces my cursor, all top menus are grey except 'View' and 'Window', I get that awful 'doont!' sound, and my only option is to just hit 'Enter' and it executes the command with whatever preferences I last set before this problem, usually of no present use to me. I have relaunched PS, restarted the computer with no other tasks and relaunched, and impotently shaken my fist at the screen to no avail.

View 1 Replies View Related

Photoshop :: CS6 - How To Close Application After Executing Droplet Actions

Dec 6, 2012

I've a Photoshop droplet with set of actions like:
 
Open
Fit image
height:180
width:180
Save
as jpeg
quality:11
Close
 
It does it's work as expected but once the actions are executed on all the images in a folder, I'd like to close the Photoshop as well, which looks tricky in Photoshop droplet. Is there anyway to close Photoshop application at last by action? Or is there any option so that droplet actions will be executed without opening the Photoshop window.

View 4 Replies View Related

Lightroom :: Transfer To Photoshop For Executing A Picture Does Not Work?

Feb 19, 2013

Execute a picture from Lightroom to Photoshop das not work. Picture is not opened in Photoshop.

View 1 Replies View Related

CorelDRAW Graphics Suite X5 :: Artistic Text Changing To Paragraph Text When Copy And Pasted To Another Document?

Jun 4, 2012

In the last 2 days Corel has decided to start changing Artistic Text to Paragraph Text when I copy & paste it across documents, completely changing the font, size & colour of what I am copying.

I've just done a factory reset & it's still doing it.
 
I don't recall doing anything that would change a setting.

The text I am copy & pasting are disclaimers that are all set on 1 document & I copy & paste them to a proof as needed.

View 4 Replies View Related

AutoCAD .NET :: Adding A Document To Document Manager Collection

Jul 30, 2013

The code below crashes with an "attempt to write to protected memory"  in debug mode (it crashes when it hits acDocMgr.add)but in the Release version it works fine. I am using Command Flags.Session

Dim acDocMgr As DocumentCollection = Application.DocumentManager Dim pStyle As Integer = Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("PSTYLEMODE") Dim acDoc As Document = Nothing If pStyle = 1 Then    acDoc = acDocMgr.Add("acad.dwt") Else acDoc = acDocMgr.Add("acad -Named Plot Styles.dwt") End If

View 7 Replies View Related

AutoCAD Inventor :: How To Get Model-document Name For Drawing-document

Feb 11, 2013

I tried to print thisdrawing.modeldocument in a vba sub, but it doesn't work.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved