Jump to content

Recommended Posts

Posted

I have found this dimension exporter on this very forum. I need to modify it so that I can add other drawings to the same excel file. Currently I have to delete the dim exp file to redo the command onf another drawing. 

Is there any way I can modify this so that the data goes to the same excel file but in a separate row?

 

I am new to AutoCAD lisp and am willing to learn from anybody offering tips!


Thank you.

dimexp.lsp

Posted (edited)

This works for me if the drawings are in the same folder, since the path uses (getvar "dwgprefix"). If you want multiple files in different locations to go to the same csv file, Change:

 

fn (strcat (getvar "dwgprefix") "DimExp.csv")

TO

fn (strcat "C:\\MyPath\\" "DimExp.csv");; Where "C:\\MyPath\\" is the path you want the file to be writtien regardless of the drawing.
			;; It must be an existing path, use '\\' between folders and also end with the same '\\' double-backslash

 

Edited by pkenewell
Posted

You can get Autocad to talk to excel so you can get the last row column value, then would write to the next line, you can also add worksheets if required.

 

The Autocad => Excel is difficult but achievable. You may need a custom solution ie may have to pay, or else will need to paste together snippets of code to do your task.

 

I would start with Getexcel.lsp by Terrycad. The maxrow maxcolumn is in Getexcel, so is putcell for a value

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...