AutoCAD .NET :: Change Active Document Window Size

Sep 20, 2012

I'm trying to change the active document window size with vb.net. This seems like it should be straightforward, but I'm having some trouble. Below is some code that I tried to use which I found on the AutoCAD DevBlog.. I thought I understood how this works, but I can't seem to import the correct references to make it work.

Dim doc As Document = Application.DocumentManager.MdiActiveDocument()
Dim docWindow As Window = doc.Window
Dim size As Size = docWindow.Size
docWindow.WindowState = Window.State.Normal
docWindow.Size = New Size(500, 500)

View 4 Replies


ADVERTISEMENT

Illustrator SDK :: CS3 - How To Change Page Size Of Active Document

Feb 15, 2014

Apparently, in the CS3 is impossible to do any scripting and using any actions. Can it be done using plugins sdk, without creating a new document? I tried using the functions SetPageSetup and SetCropBox but no effect

View 6 Replies View Related

AutoCAD 2013 :: Change DWS File In Active Document

Jul 30, 2012

I write plug-in for AutoCAD in C# and I have a question. How I can change dws-file in active document?

I know how it's doing in LISP, but not  in C#.

View 1 Replies View Related

AutoCAD .NET :: Event For Change Active Layer In Document

Aug 24, 2012

Is there event for change current (active) layer of document?

(it's not Database.ObjectModified - it's not raised).

I tried to do it with binding as:

public void Initialize()
{
var layerList = Application.UIBindings.Collections.Layers;
layerList.PropertyChanged += new PropertyChangedEventHandler(LayerList_PropertyChanged);

And -= in Terminate, but... Autocad 2012 chashed _sometimes_!!!

Impossible to understand when it happened. So I reject this way. Is there other way to handle this event?

View 2 Replies View Related

Illustrator Scripting :: Change Active Layer Name Same As Document Name

Sep 30, 2013

I would like to make the active layer name the same as the document name.  I know very little about scripting.  I found this script:
 
var idoc = app.activeDocument;var ilayer = idoc.activeLayer;var filename = idoc.name;ilayer.name = filename;
 
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name.  Is there some way to modify this script to have it exclude or delete the file extension?

View 4 Replies View Related

AutoCAD .NET :: How To Change The Document Window Title

Jul 7, 2013

I set the document.window.text="aa" what i want 

However, when the state of  window the window is changed the text is re over to the document full name. I also use the AcadDocument WindowChanged event,but it is not use.

View 5 Replies View Related

Photoshop :: Open A Document / Image Size And Script Alert Window Pop Up?

Apr 28, 2012

Everytime I open a document in Photoshop CS5, these 2 dialog boxes (Image Size, Script Alert) would pop up. to cancel 2 times to start editing. Is there a setting I can disable this?

View 3 Replies View Related

AutoCAD Architecture :: Change Window Size

Sep 6, 2012

Sometimes when we place a window in a wall we can grab the grip and stretch it to any size we want. Other times the only sizes we can use are the standard sizes. I know how to add a standard size but how can we make it to where you can just strectch it to any size we want?

View 4 Replies View Related

AutoCAD Inventor :: Change Text Size Of A TextBox Object In A Part Document Sketch

Oct 3, 2008

This code works with no errors but does not change the text size. A user can over ride the text size (Font size) so I'm hoping it is possible thru code.

Dim oSketch As Inventor.Sketch
Set oSketch = oPartDoc.ComponentDefinition.Sketches("Sketch1")
Dim oText As Inventor.TextBox
Set oText = oSketch.TextBoxes.AddByRectangle(pnt1, pnt2)
oText.Style.FontSize = 0.1

View 3 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 .NET :: Turn Off / On All Layers In Active Document

Jan 5, 2014

I would like to turn off all the existing layers in active document. I have found in developer's guide how to turn off one layer with specified layer name but can not apply it on all layers with any layername.

I tried to get all the Object ID's in layer table and then for each object turn layer off but seems that it does not work.
 
<CommandMethod("FilterLayers")> _Public Sub FilterLayers()'' Get the current document and databaseDim acDoc As Document = Application.DocumentManager.MdiActiveDocumentDim acCurDb As Database = acDoc.Database'' Start a transactionUsing acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()'' Open the Layer table for readDim LayerTable As LayerTable = acTrans.GetObject(acCurDb.LayerTableId, OpenMode.ForRead)Dim LayerTableRecord As LayerTableRecord = acTrans.GetObject(LayerTable.ObjectId, OpenMode.ForWrite)For Each ObjectId In LayerTableLayerTableRecord.IsOff = TrueNext'' Save the changes and dispose of the transactionacTrans.Commit()End UsingEnd Sub

View 3 Replies View Related

AutoCAD .NET :: Read Layers In Active Document From External App?

Jul 22, 2012

I have an external drawing processor and one of the functions is to read the layers in an AutoCAd drawing and if the name matches freeze/thaw it. With modifications over the years I have had it working with 2002 through 2008. Now I'm getting errors. When I tru to use the Interop, I get "Call Rejected by Callee" errors, when I use the

ApplicationServices method to get the application and active document, I getI" Method 'GetEnumerator' in type 'Autodesk.AutoCAD.DatabaseServices.LayerTable' from assembly 'Acdbmgd, Version=18.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation." errors.

Basically for the interop method I use this

Imports Autodesk.AutoCAD.Interop Public Function GetAcadApp() As AcadApplication Dim progID As String = My.Settings.strAcadProgID Dim acApp As AcadApplication =

[Code]......

View 2 Replies View Related

AutoCAD Inventor :: Capture Active Window

Sep 9, 2013

I`m looking for the code which will capture the active window similar to iProperties-->Save--> Capture

View 4 Replies View Related

AutoCAD Inventor :: Finding Referenced Document Of Active Sheet

Oct 22, 2012

I'm trying to get the value of the Category iproperty of the model on the active drawing sheet.  This is not a problem in a single sheet drawing, but I'm not sure how to specifically retrieve the Referenced Document of the Active Sheet in s multi sheet drawing.

Here's what I have: 

Option Explicit

Public Sub PartsListFilter()

'set reference to the drawing document
'assumes that a drawing is active
Dim oDraw As DrawingDocument
Set oDraw = ThisApplication.ActiveDocument
[code]........

View 1 Replies View Related

Photoshop :: Why Is CS6 Zoom Change Window Size Is Different Than Previous Versions

Sep 23, 2012

Why in CS6 when zoom changes window size and a floating window fits in Photoshop window or on other display screen do I get scroll bars where a select all selection marching ants are not visible on all four sides till I drag out the window to get rid of the scroll bars so I can see all of marching ants. 

In previous versions of Photoshop space for scroll bars is present but there are no scroll bar, select all marching ants are visible on all four sides when an image's window fits in Photoshop window or on second display. Is there a way to make CS6 work like previous versions? Also if I just open a document and Photoshop fits it to Photoshop window or second display the floating window is correct without scroll bars.

View 4 Replies View Related

AutoCAD Print / Plot :: Publishing In Background - Active Window?

Sep 8, 2011

For some reason, when using publish in 2012, it keeps taking me out of whatever window I have active at the moment. In all my versions of cad, I've never once had this issue.

View 3 Replies View Related

CorelDRAW X6 :: Getting Active Document Units Via VBA

Sep 3, 2013

Have been working on a little something and would like to know what units the user is using in their document. Basically what is selected here:

The thing is, no matter what is there (and while all other menus and such use the units) Active Document.unit stubbornly returns inches. Is there a way to get the proper ones using VBA?

View 3 Replies View Related

Photoshop :: Convert Layer To (16-32bit) Not Active Document?

Sep 27, 2013

Is there a script to convert a layer or layer group to a 32-bit image rather then the entire active document at present that is the only option in Ps 5.x.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Message Not Showing In Console When Load Active Edit Window

Aug 2, 2012

I'm working with our new copy of AutoCAD 2013 and using the Visual LISP IDE to create code. I also have an AC2009 machine right next to me for other tasks. On the 2013 machine when I click the "Load Active Edit Window" button it switches to the console screen but there are no messages printed like:

$
; 37 forms loaded from #<editor "C:/LISP/My-Lisp.lsp">
_$

This of course is making it extremely difficult to debug. I have checked the environment settings and they are exactly the same on each machine. The AC2009 machine prints the messages but the AC2013 machine is just giving me a blank console screen.

View 1 Replies View Related

Illustrator SDK :: How To Get List Of All Fonts And Colors Used In Active Document (AI File)

Oct 24, 2011

Is it possible to get the list of all the fonts and colors used in the active illustrator document (.ai file) ?
 
if yes then how?

View 6 Replies View Related

Illustrator Scripting :: Select Pattern Objects In Active Document

Mar 16, 2014

We need a script that select all pattern objects in the active document in illustrator.

View 5 Replies View Related

Photoshop :: All Images Open Way Too Small In CS6 Active Work Window?

Nov 18, 2013

All of my images open way too small in the Photoshop active work window.  (CS6)  Is there a way to reduce the overall size of the active window?

View 1 Replies View Related

Edge Animate CC :: Make The Animation Continue Even If The Window Is Not Active?

Dec 18, 2013

When the animation is running, if I select another tab, the animation will stop.  I would like it to continue.  How do I do this?

View 1 Replies View Related

CorelDRAW Graphics Suite X5 :: Get Text From TextBox1 By Pressing CommandButton1 To Active Page Or Document?

Jul 22, 2013

How do I get my text from my TextBox1 (add text)  by pressing my CommandButton1 (okay) to my active page or document?

View 1 Replies View Related

Premiere Pro :: Image Size In Source Window And Program Window

Feb 6, 2014

In the program window, it looks like its been pushed way in on the full image in the source window.  No matter what I do, I can't get it to appear the same as in the source window...

View 4 Replies View Related

AutoCAD Inventor :: Change DimStyle To Active Standard?

Jun 20, 2012

Changes all dimensions, balloons, ect (define more if you want) to current object default in active standard.

Sub ChangeDimStyle()'J.Kriek 2012 Dim oApp As Application Dim oIdw As DrawingDocument Dim oDim As DrawingDimension Dim oBalloon As Balloon Dim oDimStyle As DrawingStandardStyle Dim oSheet As Sheet Set oApp = ThisApplication

[Code]....

View 9 Replies View Related

AutoCAD Inventor :: Change Active Drawing Standard With ILogic

Sep 2, 2011

I am trying to have one drawing with B size and E size sheets I am trying to get the border, title block and standard to change when the sheet format changes. I can get it to work when I run the rule but have hard time find information to just change when sheet format changes. And I can't find anything or I should say a sample of how to. I think I found the code just don't know how to make it work. Here is what I  have so far.

SubMain()

IfActiveSheet.Size="E"Then
ActiveSheet.TitleBlock="G&T (E)"
ActiveSheet.Border="G&T Border (E)"
EndIf
IfActiveSheet.Size="B"Then
[code].......

View 9 Replies View Related

AutoCAD Inventor :: Change Active IPart With ILogic Form

Jul 29, 2013

I have an Ipart I would like to have a Ilogic form to change the active Ipart. I tried iPart.ChangeRow but I did something wrong and it doesn't work.

View 2 Replies View Related

GIMP :: Change From Multi-window To Single Window View

Apr 17, 2013

How do I change Gimp from a Multi-window view to a single window view?

View 7 Replies View Related

AutoCAD Inventor :: ILogic Rule - Change Linear Units In Active Standard

Jul 16, 2013

Within an IDW file, you can go to the Styles Editor, then click on a standard.  On the General tab, there's a drop down for the unit of length.

Provide the code so that I can change this setting from Inches to mm with an iLogic rule?

View 2 Replies View Related

Photoshop Elements :: How To Match On Screen Document Size To View Print Size

Oct 7, 2013

how do i match on screen document size to view print size? when i create a new document and put in its dimensions when i press view print size it appears alot smaller on screen

View 4 Replies View Related







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