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
ADVERTISEMENT
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
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
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
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
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
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
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
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
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
View Related
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
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
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
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
Mar 16, 2014
We need a script that select all pattern objects in the active document in illustrator.
View 5 Replies
View Related
Mar 27, 2012
I want to change the default precision shown in my drawing from two decimal places to three. In my .idw file the "Units" tab does not seem to be there. I see Standard, Sketch, Drawing, Sheet. I could change each dimension one by one, but there's got to be an easier way.
View 2 Replies
View Related
May 15, 2009
How do I make it so a new document in Photoshop uses Inches as its units instead of pixels? I have it set to inches in the preferences -> units & rulers but every time I make a new document it defaults to pixels for the dimensions. way to make that default to inches?
View 1 Replies
View Related
May 21, 2012
Where did they put it in IV 2013?
View 9 Replies
View Related
Aug 23, 2012
How do I change the document units using iLogic rules.
View 3 Replies
View Related
Mar 18, 2014
document info / object can't chane units to mm, it show inch only....WHY?!?!?!
View 2 Replies
View Related
Feb 5, 2014
PC, Windows 7, AI CC..I have a document that displays units in points, and when I change the unit type to inches in the preferences panel and the Document Setup panel, the change won't apply.
Â
I've tried saving as a new document, restarting, etc. I even tried setting the units to other units... doesn't matter what I have the units set to in preferences, it's always displaying points.
View 2 Replies
View Related
Mar 7, 2014
Since Edge only has rectangles and ellipses built in as available shapes, how to I/we work with polygon shapes and active mouseover areas INSIDE of these shapes and non-active mouseover areas OUTSIDE of the shapes?
Â
Problem/symptom: when I import a polygon, be it any file format from from Photoshop or SVG from Illustrator, a rectangular border/background (transparent) gets applied, leading to this rectangle defining the mouseover area of the shape - and not the shape itself (be it a star or whatever).
Â
WHAT I WANT: the very shape defines the mouseover area. How do I achieve this?? See examle below:
 Â
WHAT I DON'T WANT: how is is now:
View 4 Replies
View Related
Mar 24, 2012
tool-active-&-inactive.jpg
In coreldraw there should be a clear appearance of tool activeness like in attachment. Besides
if any command is keystoreked then the command is displayed and in the center so that user
can understand that the command is performed....
Â
see the attachment as how the tool should be clearly appeared as activeÂ
View 2 Replies
View Related
Nov 2, 2012
Yesterday, my text unit setting went wrong !
Now it's set in picas : « 2;0 pc » or « 0;7,5 pc »
I want it in set in points : « 24 pt » or « 7,5 pt »
How can I reset the unit setting to points ?
View 7 Replies
View Related
Aug 13, 2012
Is there quick way to switch between units of measurement in corel draw?
View 8 Replies
View Related
Dec 11, 2010
I need to use both inches and mm for my designs constantly ,is there a keyboard shortcut to make that happen?
View 10 Replies
View Related
Mar 11, 2011
I don't know if this has been reported but I found out today when working on a web design (hence working in the new unit - pixels) that you can't actually use the Dimension tools for measuring pixels. That's a pity because often you need to work with exact pixel dimensions when making websites and here the Dimension tools could come in very handy. It seems counting pixels by hand is a bit old-fashioned. Of course you can use calculations, but still...
View 5 Replies
View Related
Nov 5, 2012
When using "pixel units" the position and sizes are reported rounded to the nearest pixel.
The two squares below are both reported as 2 pixels square. Â One is actually 1.5 pixels square:
can the pixel coordinates and sizes not be rounded?
View 14 Replies
View Related
Nov 2, 2013
units.jpg
how to remove the red marked word units to be removed
View 1 Replies
View Related
Nov 13, 2012
CDR6 with update on Windows 7: Cannot collate any document. A co-worker using the same CDR6 can collate. Is this an uninstall and reinstall solution?
View 6 Replies
View Related
Apr 12, 2012
I just noticed that X6 crashes (freezes completely) when importing a "corrupt" pdf document. When I import the exact same file in X5, I receive the prompt "The file is corrupted." OK and I am back to where I started. X6 just hangs..... and never returns, you have to kill X6 and reload losing some of if not all the work you did prior to a save. Not good.
View 2 Replies
View Related