AutoCAD 2010 :: How To Save DWG File Using Lisp

Jan 22, 2012

I'm trying to save a dwg file in .net using lisp and it works fine for local files, but when I try to save on server it doesn't work.

here's the

//acApp is an instance of Autodesk.Autocad.Interop.AcadApplication.

acApp..ActiveDocument.SendCommand(string.Format("(defun caveFile() (Command "saveas" 2010 "{0}"))
",path));

acApp.ActiveDocument.SendCommand("SaveFile
");

when path parameter is set to @"d:\test.dwg" it works and saves the file but when set to @"\\server\New Folder"\test.dwg" it does not work.what should I do?.

View 1 Replies


ADVERTISEMENT

AutoCAD 2010 :: 2012 Crashing Whenever File Open / Save Or Save As Selected

Jun 27, 2013

I have the student version of AutoCAD 2012 on an HP laptop with Windows 7 Home Premium OS.  I originally installed AutoCAD in June of 2012.  It worked fine for 9 or 10 months but now whenever I select File/Open, File/Save, or File/Save As, AutoCAD stops responding and the spinning blue donut appears.  AutoCAD never comes back and I have to close it from Task Manager.  I uninstalled AutoCAD and reinstalled it, and the process went smoothly.  However I still have exactly the same problem with the File operations.  I apply Windows updates, but other than that have not made any changes to the software on the laptop.  AutoCAD works fine for everything except the File operations.  I am able to save with CTL/S and am able to open AutoCAD files from File Manager. 

View 3 Replies View Related

AutoCAD 2010 :: Unable To Save File - Losing Original File Afterwards

Feb 12, 2013

I found this error a bit strange, my colleague it trying to save a file and this error keeps on coming out (see attachments). When we try to save it, it only saves as a temp file. When we try to open up the temp file and try to save it, it still doesn't allow us to do. Also, when we cancel the save, the original file will be gone and he will lost all of his data. Below are the specs of the computer and version of the AutoCAD.

Computer: DELL Precision T5500

OS: Windows 7 Ult

AutoCAD Version: 2011

Also, we're using ProSteel Series 3 as well. We tried saving the file using ProSteel and just AutoCAD but it didn't do the trick. I've tried some options (listed below) that might get it to work but still no luck.

1. Restart the computer.

2. Repair / Reinstall AutoCAD.

3. Give permission to the folder (read from the forum).

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save File As TXT?

Oct 30, 2013

I have a Lisp program that is reading information from a .txt file. The problem is, the file we get is an .edi file extension, and right now, the user has to manually change it to a .txt file for the program to run. Can I get autolisp to save the file as a .txt?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save Additional Copy Of DWG File Using Macro

Aug 11, 2012

I need to save an additional copy of a AutoCAD drawing whenever I press the save button.

Simply put, Every time I press save the autocad drawing is saved (Obviously!!!) but

I also need to save an exact copy of the drawing in a folder called (for eample only) "C:TestFolder"

I can do this using DxfOut for dxf files but I need to do this for dwg files.

Can it be done whenever I press the "save" button.

View 1 Replies View Related

AutoCAD 2010 :: LISP To Create Layouts Using CSV File?

Aug 8, 2013

Lisp that can create layouts (using a dwt--I would code in the file path to my dwt) reading data from a csv file??? I would create the drawings ahead of time, all I would need is to run the lisp and it would create all the layouts in those dwgs and name them according to the csv. 

The csv file contains the drawing names in column A and the layout names in column B.  So, what I want to do is create "n" number of layouts in specific dwgs, using the cell data it reads from column A--which are the drawing names, and then rename all those layouts with the cell data from B--note it would not create duplicate (existing) tabs. This way I can re-run it later to add new layouts to the drawings as needed. 

The reason is that I work on projects with several hundred layouts--thus the need to create layouts more easily across as many drawings as necessary. Instead of renaming/deleting a ton of layouts; it would be easier to start with a minimal template(s) and have the lisp create the exact number of layouts we need instead of going back and making a ton of edits. Since the csv is created at the beginning of the project, any changes later (adding layouts), can easily be done by running the lisp again. 

View 7 Replies View Related

AutoCAD 2010 :: Edit Lisp File For New Functions

May 1, 2013

add a line to the code you wrote so I could use iunembed or detach the old image in the begin of the lisp command. Iunembed command ask what to name tif after it is unembed. Is there a way to detach the old embed image and run the other parts of the command? Keep in mind I change the lisp little bit.

; Attach Drawingname Image [insert] at scale 12
(defun c:AI12 ()
(defun dxf_ (n L) (cdr (assoc n L)) )
(defun dxf (n L) (cdr (assoc n L)) )

[Code].....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Read Lines From A File And Save To Multiple Lists?

Jul 22, 2013

I am writing a program to grab a bunch of layers from a list, check a drawing to see if the layers are on the list, and if not save to an external file. I have the second part of the program done, but I can't get the first part to work.

I am trying to open a file read the contents and save it to a list.

Here is the code I have so far, but it doesn't even get into the foreach statement.
 
(setq layerslist (list '"0list" '"detaillist" '"clearancelist" '"clearanceelist" '"doorsdrawerslist" '"hiddenlist" '"hiddenelist" '"deletelist"))(setq count 0)(foreach thislayer layerslist (setq f (open (strcat "C:\filterlists\" thislayer ".txt") "r")) (while (/= (setq text (read-line f)) nil) (setq (read thislayer) (cond ( (= 0 count) (cons (cons 8 text) (read thislayer)))( (append (read thislayer) (list (cons 8 text))) ) );cond );setq (setq count (+ count 1)) );while (close f) );foreach
 
I've also attached one of the text files. Im doing something in the wrong order, or I have something inside the wrong set of parenthesis.

View 2 Replies View Related

AutoCAD 2010 :: Uploaded Lisp File - Bad Character Read

Mar 6, 2012

I uploaded a lisp file into AC 2012 and it shows that it uploaded sucessfuly. However when I go to run the routing i get the error message  'error: bad character read (octal): 4'.

View 1 Replies View Related

AutoCAD 2010 :: Use LISP File To Create Tool Palette?

Aug 9, 2013

How to use a LISP file to create Tool Palette?

View 3 Replies View Related

AutoCAD 2010 :: Write An Lisp File That Would Embed A Tif Image

May 5, 2013

Write an lisp file that would embed a tif image

View 5 Replies View Related

AutoCAD 2010 :: LISP File To LIST All OBJECTS On A Drawing?

Feb 24, 2012

I have to list all object data on some 4000 drawings. The drawings have been created in an unkown version of autocad and are electrical in nature. It would be great if a LISP file could be created to extract all of this too individual Excel or text files.

View 1 Replies View Related

AutoCAD 2010 :: Freezes When Trying To Open New File Or Save As?

Oct 2, 2012

we have a new lab in our district with Autocad 2010 64-bit version installed on HP Compaq 8022 Elite SFF computers.  There is 4 GB memory on the computers and a Quadro 400 graphics card.  Autocad and Windows 7 64-bit have both been updated to the latest versions.  The Autocad application locks up almost every time someone chooses the new document icon, or when they try to 'save as'.  Sometimes when they choose to open a new document first, close that dialogue box, then try to choose the new document icon it works ok.  But, for the most part, the application is unuesable. Some possible solutions we found online that don't work are to not use the Aero themes (we don't) and to not use Norton AV (we don't).

View 9 Replies View Related

AutoCAD 2010 :: File Save As Default Variable

Sep 21, 2009

We are getting ready to deploy 2010 and I am writing a script to set some of the system variables on all the installs.
We have some users with 3rd party programs that won't run in 2010 yet so we will have a few people still running 2007 and 2008. I want to set the default File Save As in my script to 2007 format but I can't seem to find a variable to modify this.

In case I wasn't clear this is the setting found in Options, under the Open and Save tab, in the File Save section.

View 9 Replies View Related

AutoCAD 2010 :: Open And Save File Dialog Box

May 30, 2012

I used to be able to save as and browse to the file where I want to sane or open a file

Now I get a dialog box where I can only save to the default location or manually enter the path and file name

Same with opening a file - I go file open and it is gives a path to the last file I used. There is option to browse - how I get this back to the normal function of open/save by browsing?

View 2 Replies View Related

AutoCAD 2010 :: How To Save Opened DXF File Again As DXF By One Command

Jun 15, 2013

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.

View 3 Replies View Related

AutoCAD 2010 :: Creating Read Only File When Attempting To Save?

Nov 8, 2012

We are having an issue where users are you autocad and are working on the drawing as they go to save Autocad pops up and says someone else is using the drawing and then creates a read only file. We are 99% sure that there is no one else using the drawing.

After a bit of a google on various forums I have came across a post which says that it maybe a network issue with the drawing creating DWL files (locked) and then it taking time to update on the network.

View 1 Replies View Related

AutoCAD 2010 :: Create DAT File From Output Of LISP Program In Command Window?

Apr 18, 2013

I wrote some LISP programs. I would like to use the output data generated by LISP program in Command arear of AutoCAD. I Heard we can dave the output data into .dat files.

View 9 Replies View Related

3ds Max :: How To Save 2010 File From 2014

Jun 21, 2013

is it possible to save 3dsmax 2010 file from 2014?

View 3 Replies View Related

AutoCAD 2010 :: Drawing 1 Does Not Allow To Close Without Selecting Save Or Don't Save

May 15, 2013

I used to be able to open a drawing then close it right away, if it was not the drawing I was looking for, as long as I didn't pan, zoom, or do anything else.  Almost a year ago I had a pop-up with-in AutoCAD that they reccommend I make this selection.  I can't remember what it said really, it was something about a script or lisp loading at each drawing opening.  Well, the result is the 'Drawing 1' does not disappear when I open another drawing and I would like that to stop.  Also as I said it does it to every drawing.  how to stop this?  I tried the 'startup' command and that is not it.  It is not a big thing just something I think is a waste of my time having to close that drawing each time I open AutoCAD.  Not sure it matters but I am using AutoCAD 2012

View 7 Replies View Related

AutoCAD 2010 :: PC Freezes After Save / Save As And Open?

Oct 6, 2010

First of all  a little bit about the hardware/software:

- Windows 7 Enterprise 32 bit

- ACAD2011 with 1.1

- Nvidia GeForce 8400 GS (not a supported graphic card from what I know)

- Intel i5-750

Since we got that out of the way let's get to it.

A week ago I was told that a lot of times the PC's freeze when you try to "Save", "Save as" or "Open" a file (we open/save on a network drive). If that happens we have to restart the PC and hope it doesn't happen again, but since this happens quite a lot (over the course of four days about 27 times on 7 PC's) I tried to fix this.

I installed the patch, updated the drivers for the graphic card and reinstalled NET Framework 4. The problem didn't occur as often but it still happened sometimes.

View 9 Replies View Related

AutoCAD 2010 :: Missing Objects From Dwg In 2013 Save As 2010

Dec 20, 2012

I am using autocad 2013 primarily and other employees are using 2010. I am saving my drawings as 2010 and for me there are no issues. On the other hand people using 2010 are having objects missing in the drawing. All layers are turned on and all thawed. The primary objects missing are AEC objects. Is there a switch to show or hide these object?

View 2 Replies View Related

AutoCAD 2010 :: Why Does Have Auto Save If Is Not Going To Save

Jul 27, 2012

Why does AutoCAD still have automatic save if it is not going to automatically save your files? I have used AutoCAD for over 20 years and when the introduced automatic saves, I thought it was the coolest thing since sliced bread. But apparently some time between release 2010 and 2012 it was redone or it just don't work. I can recall closing a drawing w/o saving by mistake after having worked on it for 2-3 hours and only loosing at the most 10 minutes of my time. I just did the same thing and lost about 2 hours worth of time and my automatic save was set to every 10 minutes as I have set it since automatic save was introduced.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Each Sheet In Excel File To TXT File

Dec 4, 2012

I am trying to export each sheet in an Excel file to an separateTXT files.

I currently have code to read each cell in a sheet, but unfortunately some of the Excel sheets have in excess of 5000 cells and it is taking too long to read. So I am switching to another method.

The program will check dates of TXT files and XLS file to make sure TXT files are current (if not, open and recreate TXT files).Then read the TXT files (much faster).

Where I am getting stuck is 2 places -

Get the names of each sheet in the excel file (not always a known name)

Save each sheet as separate TXT file.

Here is condensed code so far without error checking, etc -

(defun E2TXT (FileName /)
(if (and (setq XLfile (findfile FileName)) (vl-file-systime XLfile) (setq XLapp (vlax-get-or-create-object "Excel.Application")))
(progn

[Code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Is Not Read Only / And Permission On File Appear To Be Just Fine

Aug 20, 2013

(if (findfile MyFile)
  (setq fl (open MyFile "a"))
)

the file exists however the open function still returns nil... the file is not read only, and permission on the file appear to be just fine.What other reasons would there be that cause open function to return nil?This is happening only on one machine. All the others are writing to the file just fine.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Writing File Path To TXT File

Dec 20, 2012

I have a file path im trying to capture in a text file however its not working and autocad is prompting back,

; error bad argument type: streamp nil

 Im assuming its because of the slashbacks but Im not sure..

Hence the code so far...
 
(defun C:GO ()(SETQ ACADLSP (findfile "acad.lsp"))(setq f (open "C: est.txt" "w"))(write-line ACADLSP f)(close f))

View 4 Replies View Related

AutoCAD 2013 :: Write LISP File That Saves Current File Into R2000 DXF Format?

Nov 7, 2013

Is it possible, in AutoLISP, to code something that will save the current file (whatever it may be, assume ..dwg or .dxf, into R2000 .dxf?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Save DWG To DXF Format

Oct 19, 2011

I am trying to save a *.DWG file to *.DXF format. The DXF file is created, but when i tried to open the same DXF file in AutoCAD,it is showing as "not a Valid DXF file".

Code :

// Open *.DWG file

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.Open("....abc.dwg",true);

// Save to *.DXF format

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database.Saveas("....def.dxf",Autodesk.AutoCAD.DatabaseServices.DwgVersion.Current);

// Close and discard changes,if any

Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.CloseAndDiscard();

When i used the save as command in Autocad, it is showing different dxf file formats(AutoCAD 2010 DXF,AutoCAD 2007 /LT 2007 DXF etc..). How to save in particular DXF format. If possible give me a sample C# code for this.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: No Save Option

Apr 26, 2012

I am new autolisp user (i use autocad civil 3D 2012), i try to coding there but it doesn't have "save" option. How to save the file i've made?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script File To Open Multiple DWG File Not Working In 2012

Dec 22, 2011

I am trying to make a script file to open a drawing and run a lisp routine. They both work independently just fine, the script file will open the all of the files fine... and the lisp is in the startup suite and works in all the files. But when I tell the script file to open the first drawing then run the lisp it hangs trying to open the next file after running the lisp. I have Filedia set to 0, but the message I get when it goes to open the next is "No canvas exists. click New Canvas." (And on top of that... Filedia even set back to 1 still does not display the Dialog box anymore, I have to shut down AutoCAD 2012 and start again then it works.) I Have tried several ways, Opening one at a time then run lisp, and open all files first and then try to run lisp (that closes the file after running) and try and run it again in the next... It will only run the lisp one time and then locks up from there.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Combine All PDF File To One File

Sep 3, 2012

I have more DWG files, all dwg file convert same size (A3 SIZE) PDF file and combine one PDF file. Find script program or lisp program.

I have script program for convert dwg file to pdf file but i don't know all pdf compile one pdf file.

View 1 Replies View Related







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