AutoCAD .NET :: How To Know Drawing Is Opened As Readonly
Sep 25, 2011How to know a drawing is opened as readonly in .Net?
View 1 RepliesHow to know a drawing is opened as readonly in .Net?
View 1 RepliesWe are using AutoCad 2012. Our company have more than 32 disciplines. For any projects the drawings are prepared with many disciplines. Civil does the civil drawing portions, water does the water pipeline portion, electrical does the electrical cable layout portions etc. etc. Each departments have their own set of layers in the drawing.
Now the problem is civil can accidentally modify the entities of electrical departments / utility departments. Though we lock the other disciplines layers programmetrically, but user can unlock the other disciplines layers easily if he wish to. Can we make those other disciplines layers read only? So that users can draw / modify in his own discipline layers but can not do that in other disciplines layer. But he can refer those layers / copy entities from those layers if he wish to? Some sort of xref type of thing is required, but we can not use xrefs as we work in a single drawing and our custom drawing management system is integrated with this type of file system accross the offices.
I have scenario where user can open the drawing using filepath like given below
Application.DocumentManager.Open(filePath, IsReadOnly);
And it is working fine.
I should allow to open the file, if file is already opened state.
I have done a drawing on my auto cad 2011 on windows and when i open it up on my auto cad 2011 for mac it only shows one layer in model space all the layers are on and thawed. how can i get the rest of my drawing to show up?
View 2 Replies View RelatedI just starting working with AutoCad 2014 Lt....and its great. I have a problem with the interface when I have two drawings open at the same time that are xref'd...the screen starts flashing, mouse dragging and the operations are very slow. Example,. if I have the plan open and the elevations open in two separate model space drawings but the plan is xref'd into the elev for reference. Is this an issue for others? What is the fix? This didn't happen in our older ACAD 2005. It is distressing, and I thought it was a server issue, but if I work off my station only, it still happens.
View 1 Replies View RelatedUsing 2011 with a PDF underlay. When the drawing is plotted as a PDF and the new PDF is opened, parts of the PDF portion of thew drawing are green. Changing the transparency, contrast, fade etc. of the underlay hasn't worked. I don't want to save the PDF underlay as an earlier PDF version because I'm snapping to parts of the underlay.
View 7 Replies View RelatedI've made a sketch in Photoshop Elements. The resolution was 743 by 663 pixels. I'm wanting to finish this in Illustrator, but when I open the same file (I have tried both PNG and PSD so far with the same results) in Illustrator, the image is extremely small, yet it says it is zoomed in 100%. In order for me to draw on this, it needs to be the same size that it looked like when it was opened in Photoshop. I understand the image is not actually resized, but the scale makes it appear smaller. And I also understand that illustrator's "pixels" measurments are incorrect (or so I have been told and observed).
I attempted simply rescaling the image myself with the select tool, but unfortunately I lose resolution and some of my sketch lines when I do this.
I'm not a master at any of these programs, so if you have an answer to how I could get the image scale to be "normal,".
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.
View 1 Replies View RelatedI 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);
} }
When I open my assemblys, It opens with a big Zoom in, and i cant see any thing!
I have to Zoom out every time... How can I repair this.
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.
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.
View 5 Replies View RelatedI 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.
View 3 Replies View RelatedContext : 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
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentActivationChanged += DocumentManager_DocumentActivationChanged; Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.DocumentBecameCurrent += DocumentManager_DocumentBecameCurrent;
I made these bunch of other parts at school this time and they use 2013 and I use 2014 at home, will I be able to open them
View 2 Replies View RelatedI 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.
View 2 Replies View RelatedThe following code will explain how it works:
[CommandMethod("RenderFromFile")]public static void RenderFromFile(){string dwgPath = @"C:TempRender.dwg";string imagePath = @"C:TempRender.png";Document doc = Application.DocumentManager.Open(dwgPath);RenderToFile(doc, imagePath);}
[Code]....
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?
View 5 Replies View RelatedMy 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?
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?
View 3 Replies View RelatedI have opened a document with several xref and i want to add new entityes into those xref. How can i do?
We launch _refedit/_refclose commands in AutoCad Command line for this. I want to do the same in Autocad.NET
How can I control the number of opened files in AutoCad-2010 ? How to do that . I have to work in 2 files Simultaneously.
View 5 Replies View RelatedI 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 would like to save my opened dxf drawing again as dxf with one click by custom button.
I was trying the next code
^C^Cdxfout;;y;v;2004;16;;
It returns the message "Can't open file", it seems like it does the save only when initial file is dwg.
The goal I wish I click a custom button and will save my opened dxf drawing back to dxf in 2004 format.
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.
View 9 Replies View RelatedWhen I try to open a LDD file with C3D, the file locks up and won't open. It appears to happen only when the LDD file has an alignment defined.
View 8 Replies View RelatedI have a little problem with autocad 2012. When I open a dwg in autocad 2012 some hatch turns solid, but same dwg is fine in autocad 2011 or previous versions. What is interesting if I am in autocad 2012 and i click on the hatch and change something on the properties and i click enter it turns normal to what it should be. So i click on the hatch again change back the whatever it was previously and hit enter. I regen everything and its still fine. So basically i did nothing to it and its fixed. So this might be bug I am not sure. So after all this, i save the dwg and exit. I re-open the dwg again in autocad 2012 the hatch is back to solid. What is very interesting in autocad 2011 everyhing is fine no hatch problems at all. I attached two pdfs as to what it should looks like when its correct hatch and what it looks like when i open it.
View 9 Replies View RelatedThis lisp can be a great. User only has to given a date and the program will state all the drawings opened in that day.
View 5 Replies View RelatedI'm using ACAD 2013, and for the first time since I installed it a month or so ago, I opened AutoTrack (by mistake). Now whenever I double click an AutoCAD file, it will automatically open in in AutoTrack, unless I open AutoCAD and open the file that way. It may be a coincidence, but my viewcube has just stopped working, and has become a static, unselectable image - like a fuzzy stamp on my drawing. I can't click or right click on it, and when I zoom, it doesn't stay in the same place at the same size, like it's supposed to.
This was happening when I was using 2012 too, but stopped after I installed 2013. As I said, it has just started up again after I opened AutoTrack by mistake.
getting Civil 3D to crash every time the Map Task Pane is opened from the Ribbon? if you type in MAPWSPACE, then it seems to "initiaite" it to work ok, but if you go right to the Ribbon: View tab > Palettes panel, and click it on there, it crashes every time.
View 1 Replies View Related