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


ADVERTISEMENT

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 :: 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 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

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

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

AutoCAD Visual LISP / AutoLISP :: Read From Multiple External Files?

Sep 13, 2012

Is it possible to loop through multiple files in a directory?

Like this: (setq file (open "..\TOPO QUADS\*.jgw" "r"))
 
Windows 7 x 64 Professional
Nvidia Quadro 4000
8 GB Ram
i5 2500 @ 3.30 GHz
Civil 3D 2012 SP 2
Civil 3D 2013 SP 1

View 9 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

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

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

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

AutoCAD VB :: All Layers Locked Except Active Layer Chosen In Combobox?

Dec 21, 2012

I have a form with a combobox and a commandbutton.

 All layers in the layermanager must be locked except the active layer chosen in the combobox. I try it with this code but it’s not the right solution.

Private Sub CommandButton1_Click()Dim layer As AcadLayer'check if all layers are lockedIf layer.Lock = False Thenlayer.Lock = True'make the layer selected in the combobox currentThisDrawing.ActiveLayer = ThisDrawing.Layers.Item(ComboBox1.Text)End SubPrivate Sub UserForm_Initialize() Dim layerColl As AcadLayers Dim layer As AcadLayer Dim LayList As String ' all layers locked For Each layer In ThisDrawing.Layers If layer.Lock = False Then layer.Lock = True End IfNext 'fill combobox Set layerColl = ThisDrawing.Layers For Each layer In layerColl ComboBox1.AddItem layer.Name Next End Sub

 2. When I choose the for next method to lock all layers (40 layers) it’s very slow.

View 4 Replies View Related

AutoCAD Inventor :: Error / There Are External Dependencies Found In The Document

Mar 11, 2013

I´m having som problems to publish a part in to the Content Center. It´s the first time I´m doing this.

The part is made with parameters and is a little bit more complex than a bolt.

The problem is that I got this message: "There are external dependencies found in the document. Please remove the dependencies then proceed with this comand."

View 4 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

Illustrator Scripting :: Read External Data / XML Or TXT And Create Files Automatically

Feb 3, 2014

Automated AI so much so that it can read instructions from an external source like xml or txt and automatically creates files and folders.
 
For example we have something like this:
File1
Hello
Font: Myriad
Size: 22
Colour: Pantone 254C
Image 1.jpg (link)
Source: Image1.png (link) clipart1.eps (link)
----------
File2
 
and so on.
 
I want AI CS5 to:
1. create an eps File1, create a folder named File1, put File1.eps in it
2. type the text Hello, apply Myriad 22pt and PMS 254 to it, centre it to the artboard
3. Place all jpegs, pngs, eps source files on the artboard and embed them.
4. Save the file as eps legacy version 10, close the file and move to the next file.

View 1 Replies View Related

Lightroom :: Read Images On Laptop But Not On Desktop From External Hard Drive?

Oct 14, 2012

I use an external hard drive for my Lightroom images. When I travel I take that external (plus a second identical one for back-up) with me and use my laptop. When I return home, I use that external to view and edit my images on my desktop. Suddenly about 350 images show up as missing or offline when I view that external drive on my desktop. Nothing is seen as offline or missing. What can have happened? I use the same external, the same catalog and do not understand why the images are seen only on one computer and not the other. I am an Apple user but can't see what difference that would make.

View 3 Replies View Related

Edge Animate CC :: Working With Polygon Shapes And Defining Active / Non-active Mouseover Areas?

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

AutoCAD .NET :: Edit On Layers On Number Of Document?

Jul 24, 2012

how can i edit on layers on a number of document 

View 2 Replies View Related

Photoshop :: Why Eyedropper Not Read All Layers In 6

Jul 16, 2013

Why does the eyedropper not read all layers?  If I have an adjustment layer above the one I'm reading the eyedropper does not take that into it's reading like it did in PS 5.0

View 4 Replies View Related

AutoCad :: Create New Document With New Layers But Paste In Existing Floor Plan

Apr 24, 2013

I am trying to create a new document with new layers, but paste in an existing floor plan since it's the shell I need to be using. When I copy clip and insert into new file, all the layers import with it. I transferred everything onto 0 layers and went into my layer manager to try and delete the extra layers and it says i cannot delete o, xref dependent, etc. I want to create my own layers, and then assign the lines in the plan myself onto the new layers.

View 4 Replies View Related

AutoCAD Inventor :: Change Library Content Centre Status From Read Only To Read / Write

May 4, 2012

How to do it?

I am using Inv/Vault Pro 2011.

View 9 Replies View Related

After Effects :: Extract External Image In Layers And Color Path

Oct 21, 2013

Well, to join the two different parts i have choosen AE software (actually is After Effects CC).Well, as i said the animation and scenario are in a different project, and i have joined both in AE. But the scenario is not always just a landscape. Sometimes is a building that the actor walks on it, so i have (in some way) to put the actor "in" the building, and if i was working with images i would easly solve that problem: select and extract to another layer what i want to be in first place, or to be the landscape. At the same logic, how can i do this in After Effects CC?Can i extract some objects by color as i can do in Photoshop?

2º For storytelling reasons, i would like that , in some moment, everything turns gray , and the actor is colored. but there's more! i would like that the actor leaves a colored path (the path that he is taking in animation). Is there any way that i can do it?

If i cant do it, i have to re-build the entire animation in Cinema4D.

View 3 Replies View Related

Photoshop :: Moving Layers From Document To Another...

Dec 8, 2008

why isn't it allowed to move a layer from one open document to another one when in the tabbed view? I can't drag&drop the layer on the doc's name in the tab row and have the layer appear in the document?

View 6 Replies View Related

Photoshop :: Posting All Layers Into Another Document

Jul 27, 2005

In Photoshop (5.5), how to paste all contents of one .psd into another .psd. All that happens is it pastes the contents of the layer I have selected. I already tried checking the link boxes of the non-selected layers, but that didn't seem to work. So...

View 3 Replies View Related

Illustrator :: Copying Layers From One Document To Another

Oct 9, 2013

using Cs6, locked down all the layers I didnt want to copy across, select all, copy .. new document select paste remembers layers, paste in front, all layers beautifully copied but I cant see any of them on the artboard, only in the layers panel.  There is nothing on top of the layers.

View 4 Replies View Related

Photoshop :: Drag And Drop Layers Onto Different Document In CS6

Dec 15, 2012

I loved an ability in Photoshop 5 to just drug and drop layer onto different doc tab to paste it. But seems like i cant do this anymore in Photoshop 6. Are the copy/paste and arrange docs  the only ways to move layers in to a new location in cs6?

View 3 Replies View Related

Photoshop :: CS6 Images Showing Up In Layers But Not Document?

Apr 25, 2013

Im currently running photoshop CS6 on windows 8 and when I try and open a file the images come up in the layers but not the actual document.

I know this has already been posted about Photoshop CS5 but I think CS6 is slightly different.

View 3 Replies View Related

Photoshop :: Get An ID CS4 Layered Document Into PS CS4 With The Layers Intact

May 16, 2009

How do I get an ID CS4 layered document into PS CS4 with the layers intact for further editing there?

View 4 Replies View Related







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