AutoCAD .NET :: Utilizing SelectionSet On Non-opened Drawings?
Aug 30, 2012
I am trying to create a function or class can be used with the MdiActiveDocument and also with the external Database. In order words the function or class should be able to access current Document and also non-opened Databases.
My difficulty is accessing the non-opened drawings and utilizing the SelectionSet to select blocks with SelectionFilter like I could do with a MdiActiveDocument.
I would like to know if what I am trying to do is even possible, or would I have physically open the drawing to have the ability to utilize SelectionSet and filters.
I am using AutoCAD 2012 and the .NET API. How can i loop through the document objects of all the open documents? i am trying to do something like the code below..
public void GetDocNames() { DocumentCollection docs = Application.DocumentManager; for (int i = 0; i < docs.Count; i++) { AcadDocument doc = docs[i]; Debug.Print(doc.Name); } }
It seems that once my newly purchased autocad lt. 13 opens up a drawing created by an other co-worker in autocad Lt. 11, it automaticly converts to 13 and now the person using 11 can no longer open the file. what I should do?
I can create a SelectionSet by using SelectionFilters and the Editor select functions. When I create SelectionSets this way I can use them in a command by calling the Previous selection. However, if I create entities, store their objectids and then create a SelectionSet by using the SelectionSet.FromObjectIds function, when I call the previous selection on a command nothing is selected. Is there a way to create a SelectionSet from ObjectIds that would be available to commands?
I've been trying to update a client menu and I've gotten most things figured out. They have a fairly elaborate routine set up to make sure our drawings work with their document control system as well as raster design. We are using AutoCAD 2011 and the menu's were meant for 2008.
Everything seems to run well except at this sub module and every time I load a raster drawing with a TIF the routine error's out at the line in Red below. I've tried everything I can think of to keep the routine running, and I want to refrain from just remarking it out, which seems to do the trick, but I do not want to do that unless it's for some other purpose. I just need to get their menus to work on newer versions of AutoCAD.
Private Sub AcadApp_EndOpen(ByVal FileName As String)
Dim sPathPart As String Dim sFilePart As String Dim sExtPart As String Dim lResult As Long Dim vResult As Variant Dim bFoundCO As Boolean
dragging a video file to new items from project file results in yellow render bar sometimes even tho previous file with EXACT same properties worked with no render bar - that has been an issue since pre-CC additionally but inconsistently pre-cloud , i could drop several items on new items icon all at once and would get all media to open in individual timelines that saves tons of time when dealing with 50-100 media files at a time by eliminating sequence labeling - was a godsend - have god send it back.
I've upgraded to Photoshop CS6 and I noticed immediately that it has no option to use the Add_001.howto file that I was using in the previous version. Is there a stand alone application or method to access this file so that it would be convenient to view the previously saved tutorials that I created?
retaining more of the resolution inherent in photo or scan imported into a video, to increase the sharpness when panning or zooming across it? eg - original photo of a map may be 8Mpix. Would it work to make a hi def clip of the zoom to insert in an SD project?
I have thought about this and want to get input on a best approach to utilizing Views created in a linked Revit project file. One need is to create a Callout within the current Revit project and reference a view from another linked project. This is a common need in many of our projects
I am trying to open Lightroom 4 from my desktop and it keeps giving me this message:The Lightroom catalog named "Lightroom 4 Catalog" cannot be opened because another application already has it opened.
When i try to copy paste some drawing entities from a heavy drawing file to any other file, the program blocks and says 'not responding', endlessly. So i always have to shutdown the program. I experience the same problem using the designcenter: when I try to copy a layout into another drawing, my computer gets stuck.
Another annoying problem with these files is that they are so heavy, while in fact they shouldn't be. I tried the aectoacad file command. In result the file id half as big, but after I open it and save it, again is the original size.
Every now and then I go back and try to use publish to speed up printing but I always go back to plotting one by one.
I work in a housing construction office and I have 10 separate drawings side by side in model space for house plans that I need plot separate to give to certain people. My problem isn't that I can't publish them separately its that I can't save them over existing pdf's individually predetermined.
Q1. do i just have to go through and change every layout name before or after i publish?
Q2. how do i change the output publish location?
Q3. can each layout be saved to a different existing pdf and remember it?
Q3. can i save these setting across to a new drawing?
When I try to run Inventor.exe it shows loading window and then it disappear and there's no response. I've tried to run it from Start->(..)->Inventor and any possible location but nothing worked. I've also tried solution with deleting C:ProgramDataAutodeskADLMCascadeInfo.cas file but this doesn't worked either. Autodesk DWG True View, ReCap and others work correctly. I use student version of Inventor 2014. It has been working previously 6 or 7 times. Same issue was with Inventor 2013 after 3 months no using.
I was working on my project today when the window popped up telling me to reload my pavement file. When I reloaded the file, the reference said it was unresolved. I tried to open that file directly, but it would not open.
Context : AutoCAD Map 3D 2013Visual Studio 2010.NET 4.0, C#, WPFFDOOracle DataStore
Requirement : When I start AutoCAD Map 2013, a default document called "Drawing1.dwg" is opened. I use the command NETLOAD to load my assemblies. Final Users don't NETLOAD, an entry in the registry does the job automatically. During Initialization, my application downloads from the database a Template DWT file to initiate automatically the connection to the DataSource, and shows the different layers and styles configured by the customer. A new drawing based on this DWT is then generated.
However, the first default document remains opened. It can be sometimes annoying for the user to have both documents opened. I've never found a nice solution to close this first default document.
My technical implementation, not working :
In the Initialize method coming from IExtensionApplication, I start my application (loading business classes, user interfaces, etc...). Once started, I download the DWT, and add a new Document to the DocumentCollection (Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager). To this new Document, I handle many events such as CommandWillStart, CommandEnded, CommandFailed, etc... At this time, my Application asks to the user to log in. And finally, I browse the whole DocumentCollection to try to close all documents that are not the new one based on the DWT.
DocumentCollection doc_coll = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager; _kleverageDocument = doc_coll.Add(dwtFilePath); if (_kleverageDocument != null) { _kleverageDocument.ImpliedSelectionChanged += new EventHandler(doc_ImpliedSelectionChanged); _kleverageDocument.CommandWillStart += new CommandEventHandler(doc_CommandWillStart);
[Code] ....
When I call the CloseAndDiscard method for each of the other Documents, I always get an Exception telling me that the document is currently drawing. Actually, the command "NETLOAD" is stil running. How can I do ? I tried another way, by using handled events on DocumentManager
I recently changed PCs and installed AutoCAD 2012 to the new machine. I was working on a patent and exported to PDF like I always do. The problem is that when I do that it automatically opens up the pdf in Acrobat after I've exported. I want to turn that feature off. I export dozens and dozens so the opening of every pdf would be very cumbersome.
The command RenderFromFile will render the 3D drawing file at C:TempRender.dwg (see this file from attachment), and then write the output image to Render.png at the same folder. The rendered image is on the top view and has visual materials.
The command RenderCurrentView will render the current open 3D drawing, then write the output image to C:TempRender.png. The rendered image is on 3D view and does not have visual materials.
Both two commands call the same shared method RenderToFile(), but their output images are different. I don't know why they are different?
Method RenderToFile is a simplified version from Kean's code. I try to make the code short and simple to easily solve the problem.
I have a storm drainage drawing that has all the parts, pipes, and their labels in model space (as a data reference) and everything shows up fine in Civil 3D 2010. But my drafter opened the drawing in regular 2010 auotcad with object enablers loaded and the labels were rotated to the world coordinate system and not the plan view. Is there a setting in the styles that controls this?
My team is using AutoCAD 2014 and multiple people have noticed that while they're working, when they try to save the file it pops up a message saying the file is read only.
Multiple people on our team has had this issue and it only started recently. (We've had it installed a few months now).Could it be the new file tabs feature in 2014?
I am importing a dgn into autocad by using the SendStringToExecute method with the 'Import' command. My problem is that once I have the dgn imported I want to do some modification and then save the drawing, but setting a new dim to the current mdiactivedocument still gives me the initial document and not the one opened by the import command as I had thought it would.
How can I switch the mdiactivedocument over to the newly opened document?
recommend a command line extractor, i want to fill (manually with excel vba) datas (block attributes) in cells with the DXF i have in tons of projects, everything is ready except i dont know which lines to consider in the DXF.
Example : i have once instance of a block in a file, but i read the dxf as a txt and i see it (called "plc_a_1") at 5 places in the txt, and the real x,y coordinate fits one of them, but the attributes for it are like 500,000 lines further..
I have been a having a repeating problem with text in AutoCAD. For some reason when re-opening my file some annotative text is know magically different. Prior to closing the file my annovative text is only set to one scale and the text width is a specific size. Then when I re-open the file, the text now has 4 different scales and the width has shrunk to completely different, casing all my text to jumble and be illegible. To be more specific when I say width of text if I look in the properties window the setting "Model defined width" is different (always much smaller). This a particularly frustrating as I cannot override this setting when selecting in properties and have to stretch each text box back to size manually. I am currently using AutoCAD LT 2013.