AutoCAD .NET :: Saving Active Drawing File
May 17, 2012How to save active drawing file with filename..
View 9 RepliesHow to save active drawing file with filename..
View 9 Repliesusing dwgDB.saveas on a drawing database that the user has open but NOT current on his screen?
For example, the user has DWG1 open and DWG2 open and currently active, my program modifies DWG1 (inactive) and when the program tries to run...
dwg1DB.SaveAs(filename, true, DwgVersion.Current, dwg1DB.SecurityParameters)
it errors with an elock violation, even though I lock the document with dwg1DOC.LockDocument before I try to save and unlock it after.
The same code runs fine on the current document so at this time I just ended making the other document current just to save it then switch back to previously current document.
What am I missing to save a document that is open but not current?
Trying to create a bit of code that when the 'OnNew Document' event is fired the code checks for a particular Custom Property. Depending on what the Custom Property is set to a form is then fired with relevant text to point the user to a specific area in the workspace. Al this works ok.
But if they press cancel i need the code close the activate 'Part1' which inturn then allows the user to select 'New' to begin again.
I have tried various scenarios but the main problem is that Inventor then crashes!
PublicSub applicationEvents_OnNewDocument(DocumentObject As Inventor._Document, BeforeOrAfter As Inventor.EventTimingEnum, Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles applicationEvents.OnNewDocument
[Code]....
I have several closed ployline shapes in a particular layer, I need to know a way to:
a) pick all the entites on that layer
b) export to a dxf file each individual entity on the layer (yes, each entity saved to a separate dxf)
I am almost positive I can answer 'a' on my own using an object collection and a conditional statement? I am really more interested in how to export an entity from current open drawing to a dxf file in .net
How to save current drawing file using save method.
View 3 Replies View RelatedWhen I try to save a 2 D drawing as a DXF file, I get a box saying "problems encountered while saving the document". I am using version 2012. My older version did this operation without a problem.
View 8 Replies View RelatedWhenever I save a drawing, it goes to a temp file. I have to do a 'save as' to bring the dwg back to the original folder. Our in-office guru thought it had something to do with the new AutoCAD 360, but I have never even signed in to that, and when we did open it, nothing was in it.
View 3 Replies View RelatedI am facing an issue while generating the thumbnail of the drawing file.
Thumbnail is generating fine for drawing file.
Once drawing file is saved using below statement,
Database.SaveAs(filePath,DwgVersion.Current);
Thumbnail generation method is returning null as given below.
byte bytCnt = br.ReadByte();
if (bytCnt <= 1) //Means bytCnt value is 1;
return null;
We use LT 2012, and recently we started having issues with file size.
Some of our drawings went from 1.5MB to 12MB after saving.
We tried saving as DXF then PURGE, -PURGE to reduce the size but always comes back.
Now, in one of the drawings I did PURGE, AUDIT, -PURGE and erased everything in the drawing, file is still 1.8MB.
Inventor 2009 creates XLS file when saving assembly drawing (IDW file).Why? How to get rid of that?
View 6 Replies View RelatedIn the last couple of days civil3d has started not opening a drawing as the active drawing
View 1 Replies View RelatedI want to insert a stored block into a drawing (model space). Below is the code I'm using and I get
Runtime Error '5': Invalid procedure call or argument.
Sub Dummy()
Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String
COESTD = "C:JimHYDROCAD_DwgsBlocksZ_COE_STDS.dwg"
InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0
Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#)
End Sub
I have written a program that basically replaces certain mvblocks, tags actually, in several drawings, the purpose being to change the displayed label of an object.
I have just 2 of the 3 affected drawings open and just 1 of those 2 is acually active at the time the program runs.When I run the program the tags in the open and active drawing get replaced fine.
The tags in the open but NOT active drawing appear unchanged but a "regen" causes them to go away but the new tags do not appear, if I save, close, and reopen the drawing, as the drawing is reopening I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everything is correct.
The tags in the unopened drawing, when I do open it, once again, I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everything is correct.
Regardless of the state (open, unopen, active, inactive) I am running each drawing through the same subroutines to delete the old tag and put on the new as I am passing the drawing DB to the subroutines, the only difference being that I am putting a document lock on the open drawings documents before I start the subroutines.
I do have the CommandFlags.Session flag set on the command that launches the program. So, what am i missing that the new tags are not showing up in the open but inactive dwg until the drawing is saved and reopened, and then in both, open and inactive and the unopened dwg the label text appears offset until the dwg opens completely?
I'm new to the style library and how to take an existing drawing that was created on one standard, and changing it to another standard I just created. The new standard has different dimension styles, text, and layers. I've added all the styles to my style library and I've set the new standard to the active standard in both the styles and standards editor and the document settings. If I create a new view, it comes in on the new standard, but the existing views are still on the old. How to I get the existing views on the new standard?
View 2 Replies View RelatedIs it possible that i can save a revit 2013 drawing and open it in revit 2011 file?
View 2 Replies View RelatedI have two tables on a drawing one showing a parts list the other changes to dimensions.
The table to show the dimension changes is a configuration table pointing to an ipart.
iLogic is used to update the ipart but you have to right click to update the Active Member in the ipart to see the drawing update.
Is there a way to automate the 'update active member'? (on the ipart table - this does update the drawing)
I just have the one row in the table, it's purpose was to pass the values onto the drawing (as the part resizes I didn't want the dimensions moving so opted to tabulate them) - hoping they would update!
or
Is there a way to have a table update parametrically i.e. I've tried .csv as a source to the table but can't force an update. This way I could scrap the ipart & just import the values to a table.
The table also includes some txt comments which change with the ipart properties.
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].......
We are using AutoCAD Architecture 2013 on machines running Windows 7. When multiple AutoCAD drawings are open on most machines in the office the icon in the Windows Toolbar shows multiple stacked AutoCAD images, and when you hover over those icons, all of the open drawings appear in thumbnail across the bottom. (This is a very nice feature!)
Unfortunately one machine in the office is not doing that with AutoCAD. That machine will show multiple icons and thumbnail previews for PDFs, Word files, etc., but not AutoCAD. Is there a setting that can be changed to make the thumbnail drawings for ALL open drawings appear when hovering over the icon in the Windows Toolbar? (That computer will show a thumbnail preview of the active drawing, but not all open drawings.)
I create a drawing of an iPart, while doing so I have the iPart model open in the background. When placing a view on the drawing the active factory member is the default option, I have a bad memory so forget to tell Inventor that actually I would like to use a specific iPart member in this particular drawing view. I then spend a long time laying out and dimensioning the drawing. When complete, I create a second sheet and copy all information from sheet 1 onto sheet 2. I then double click on the main drawing view and change the model state to an alternative factory member. At this point I realise that the drawing on sheet one is based on the active factory member and start swearing.
The result of changing to a different member when the existing drawing is based on the active member is that ALL DIMENSIONS DISSAPEAR FROM THE DRAWING AND HAVE TO BE PAINSTAKINGLY REPLACED. At this point I will usually REDRAW SHEET 1 so that further sheets can be created quickly in the future by selecting an alternative factory member.
can I change the software defaults somewhere in the setup to prevent the 'active factory member' being displayed as an option in the first place?
I want to convert active dwg file to jpg file. How to do ?
View 4 Replies View RelatedI 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#.
Is there a way to copy just one item out of an x-ref? I am coming from MicroStation where the X-Refs acted alot differently. The only thing I miss so far is just being able to copy one item from a x-ref into the active file.
View 9 Replies View RelatedAutoCAD LT 2012
I had my automatic save set up for every 10 minutes but files were not being saved regularly. I deleted files from the Temp folder thinking it was full and now there are no .sv$ saving at all. How can I make drawings save automatically every 10 minutes?
I have an issue with opening assembly files as they always open as Master not Last Active.
Have I missed an option on another tab or something else?
64-Bit Inventor Professional 2012
Build 219, SP2
We have had this issue now for a couple years and don't know what is causing it. We are using vault pro with admin set single project file. A user can work for months using correct.ipj, then randomly at 10:42 they will notice the active project was been changed to some other temporary project location "c: emp.....". Then it will happen to different users at different times. I cant seem to find any correlation to anything. I can only imagine that it is somehow triggered from the vault addin.
We are inventor 1012 and vault 2012 pro.
I am having an issue when opening and saving files is very slow when I have a project active in the Project Navigator.
If I have an active project, and I open a file via Project Navigator or Windows Explorer, the process hangs for 15-20+ seconds at the 'Opening C:xxxxxxxxxxxxxxx.ac$' point, where it is creating the temporary file.
If I 'Close the current project' in the project browser and open the same file via Windows Explorer, the process takes less than a second.
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:
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?
I have produced a 3d factory layout drawing for a client, Is there a way of saving it as a .exe or what ever. So that he can open the drawing and view it in its 3d form, orbit, zoom in and out etc
I understand they could download the free Autocad viewer program .
I recently upgraded to PSE11 but the installation did not create the service Adobe Active File Monitor V11. I followed the forum thread [URL] .... to completely uninstall, remove residual files, reinstall from DVD. Still the service DOES NOT EXIST.
I followed the Elements Village thread on "Watched Folders Issues" to manually create the service. But when I attempt to start it, I get an error that says "Error 1053 The service did not respond to the start of control request in a timely manner."
I'm using WinXP Media Center Ed. SP3.
iu accidently close a drawing that i had been working on with out saving... is there a way that i can recover the work that was not saved?
View 9 Replies View Related