AutoCAD Visual LISP / AutoLISP :: Exporting Text To Excel

Jan 24, 2012

I am trying to export what looks like a table of text to Excel. The problem I have is the table is not an actual TABLE within AutoCAD but rather just columns of text with lines drawn around it. How I can grab this text and then put it into an Excel Spreadsheet.

View 5 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Export Text To Excel

Jun 14, 2009

how create lisp convert text (from drawing) to excel

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Any Way To Extract All Dimension Text At End Into Excel

Aug 16, 2012

I'm dimensioning an old drawing with the real (measured) dimensions and with the drawing dimensions in brackets (using ' 1500 (<>)' to give '1500 (1505)' for example.

What I'd like is to also be able to put on the difference between the length I type in and the length in brackets - as this would let me see any really glaring errors that can't be attributed to user-error on the laser measure.So I could type in '1500  (<>) (X)' where X is the formula, and get ' 1500 (1505) (5)' back?

How to be able to run a script that could highlight any dimensions where the number is brackets and the typed number have a a difference of, say, 50.Or failing that, any way to extract all the dimension text at the end into excel so I can see the differences myself?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Passing Excel Cell Content (Text Strings)?

Oct 23, 2012

How can I pass the contents of a cell value (text string) to Acad? I want the user to click on a cell, then have lisp use the string as the name of a block to insert.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Read Excel File To Insert Text Values At Coordinates

Mar 6, 2013

I got a new work and get it done in the next 2 days, but first I need to do this... from a text file (or excel file, I got both) I got 3 columns, 1 one for node number, and 2 other for X and Y coordinates for each node.

So from that file I need to insert into autocad the node numbers as text (using the current style and height) at the point specified by the other two columns, that are the X,Y coordinates which will be the insertion point of text..

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Exporting Point Locations To Text File

Jun 8, 2012

Im trying to come up with a lisp that will export x and y coords to a txt or cvs file. However, I need the lisp to export in this format

Units       Inch
WPT      1     0     0     ( X=0 Y=0)
WPT      2     1     1     (X=1  Y=1)
WPT      3     2     2 

I need to be able to set my zero with move origin and the export the points.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Interacting With Excel - ExportAsFixedFormat

Aug 17, 2011

I wasn't able to find out any information on what format the parameters are required to look like when passed along with the Method ExportAsFixedFormat.

I'm currently using the following code to change the active printer followed by the printout command
 
(vlax-put-property XL "ActivePrinter" "DocuCom PDF Driver on Ne03:")(vlax-invoke-method XLS "Printout")

 where XL is my spreadsheet and XLS is the active worksheet.  This works but the printer controls filename and location.
 
(vlax-invoke-method XLS "ExportAsFixedFormat"

 I've found the ExportAsFixedFormat but can not find any documentation that shows how to format the parameters within LISP to send to Excel.

The object browser for VBA in Excel shows the following:
 
Sub ExportAsFixedFormat(Type As XlFixedFormatType, [Filename], [Quality], [IncludeDocProperties], [IgnorePrintAreas], [From], [To], [OpenAfterPublish], [FixedFormatExtClassPtr]) Member of Excel.Chart
 
I recording a macro and got the following that shows some additional information.
 
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _"C: est.pdf" _, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _:=False, OpenAfterPublish:=True
 
Is there any documention showing what this looks like when using the vlax-invoke-method?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Excel Coordinates To Table

Mar 19, 2013

I need to draw a table with point number, easting, northing, elevation for a lot of points and need a lisp to read the xl spreadsheet and draw the table.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Data From DWG To Excel?

Sep 4, 2012

I have Export data from dwg to notepad lisp programe. But i need lisp programe for Export data (Easting,Northing and Level) from dwg to excel.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Excel Sheet Column

Aug 13, 2013

I'm trying to get an excel sheet to open and count cells based on the text inside a selected column then compare it to cad. The column says "red" or "green" and I want to compare it to a count of red and green hatches in cad.

I managed to get them to be counted in cad but I'm not sure how to get the excel part to work.

Note: I posted an earlier post thinking to count the actually color in the excel cells rather than the words but that ended up being quite complicated.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Import From Excel Or Notepad To DWG

Sep 5, 2012

I have some coordinate in the excel file. How to import from excel to dwg. All coordinate i will make polyline. I know one method all coordinate copy and paste to command prompt. But i need script file or other method.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Drawings From Excel

Dec 16, 2011

This probably isn't the correct discussion group but not sure where else to post this. 

My sales department wants to be able to create drawings based on entries in selected in their Excel qouting tool.  Basically, they want to configure a product in the field, and be able to show the customer the drawing with TrueView. (They don't have AutoCAD installed).

I would think the best I can do, is manipulate a .dxf file based on their selections but that may get very complicated.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Post HOSTNAME To Excel

Aug 26, 2013

Lisp routine that can write to an already existing XLS file?  What i need is an Excel file that will be updated with a users 'hostname' when they start AutoCAD.  I can get the hostname information with the below code, but I'm not sure how to get this value into an Excel file.

(getenv "computername")

Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Call Excel Macro

Nov 10, 2012

i want to call an excel macro from a lisp. is it possible?

now i have this:

(startapp "C:\Program Files (x86)\Microsoft Office\Office12\Excel.exe"
    (strcat """
     (getvar 'dwgprefix)
     (vl-filename-base (getvar 'dwgname))
"XXX.xls""
)
)

i just want it to run macro1 from book1.xls

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Data From DWG To Excel

Sep 4, 2012

I have Export data from dwg to notepad lisp programe. But i need lisp programe for Export data (Easting,Northing and Level) from dwg to excel.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Cellname In Excel

Jun 25, 2012

I would like to get the cell with a specific name in Excel.

In Excel you can give a cell a custom name like "Project_Name".

How do I get the sheet and cell(row,column) of the cell with this custom name ?

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Programmatically Import Excel Table?

Apr 25, 2013

I would like to link an AutoCAD table to an Excel file with the first method described in this page:

[URL]

I know the filename of the Excel spreadsheet and the range as well.

Is there a way to make a script that links the table and then detach the link after that ?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extracting Data From Excel File?

Jun 12, 2013

We have a custom LISP program (Written, upadated in 2003) that takes a keyed in item number, opens and searches a .txt file with four coulmns, for the keyed in item number (column 1) and returns a part number (column 2), description (column 3) and any information in column 4.

Here is the Part of the cod in question:

(setq recx (open "H:/ACAD2012/alcocustm/LISP/hardware.txt" "r"))
(setq d "?")
(setq rec (read-line recx))

[Code]....

A quetsion was asked if the data in the .txt file could be put in an Excel file. I tried looking at other post, but I can't seem to find a clear cut way to open and extract the data. Or this old dog overlooked a boand. Is there a easy way to do this, similar to the above?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Importing An Excel Column Into A List?

Sep 6, 2012

I am trying to import a list of customers from column A in an Excel file into a list for a popup_list for my Drawing Properties DCL.  I am having trouble finding information on how to do this.

Basically: Load the file, (workbook through active sheet: vlax-get-property)

(setq xlSheets (vlax-get-property xlBook 'WorkSheets) )

Then, how do I get it to put column A properly into a list for the DCL?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Excel Macro To Zoom To Object In Current DWG?

Jun 14, 2013

I am looking for an example excel macro to zoom to an object given the obect entities handle.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieve Cell Data From Excel File?

Oct 7, 2011

I would like to be able to retreive data from a sepcified cell, in a specified worksheet, from an excel file.

I don't have any clue how to connect to an excel file and read the data. Most seems to think you already had an understanding but I'm starting from the beginning.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Exporting List Of Objects

Jan 6, 2012

How to export to a txt file a list containg all the objects on the current layer and their properties?

To be precise, I would like to export the following items from a selection of plines:

- ObjectID;
- Start Point;
- End Point;
- Vertex Points;
- Width.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Excel Program And Count Cells Based On Colour?

Jul 30, 2013

Is this something that is possible? Basically I have an excel file with sample data that comes coded (red background for fail, Green for pass) Then we transfer that into halos on a DWG. got a routine to count the halos in a DWG. Now I was thinking it would be nice if it compared the number to the excel file to make sure no mistakes were made when placing the halos.

So as I mentioned I've seen rountines to read data in cells but none to count cells based on colour.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extracting Attribute Values From Multiple Dwg Files To An Excel File

May 11, 2013

how to extract the attribute value of a  particular block in multiple drawings to an excel file.

Eg... there are nearly 800 drawings where I need to list down the description and Drawing number which is mentioned in the title block name "Title". The Drawing Number and the description is done in same attribute block. extract the data into an excel file or txt file. All the drawings are saved in one location.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Circles With Diameter Of 5 Related To Imported Points From Excel

Feb 21, 2012

i attached a lsp with and excel

the lsp does creat circles with diameter of 5 related to imported points from excel

i realsed that it is able to get the first column but can get the coordinate from the second one

                (setq posX (atof (substr line 1 nPos)))  (this is ok)
                (setq posY (atof (substr line (1+ nPos)))) (not this one)

View 2 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 :: Existing Text To Keyboard Entry Text

Jun 21, 2012

I have two attributes "REVN" and "REVD" in a block "ATT" that I would like to change (globally preferably) to the following.

(1) Existing text to keyboard entry text.

(2) Colour from existing to 10

I am a bit lost in the (command "-attdef" .......)

(defun c:atc ()
(setq rev (getstring "Please enter review"))
 (setq dat (getstring "please enter date"))
 (command "-attdef" .."ATT".."REVN"....."c" "10")..)
 (command "-attdef" .."ATT".."REVD"....."c" "10")..)

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Won't Wrap In Text Window?

Oct 8, 2013

When I click on an object to retrieve it's extended data, the data keeps writing to the right, it does not return to the next line, when the text approaches the end of the screen.  Very difficult to analyze information.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text Width Before Text Creation

Mar 2, 2013

I want to know is there any formula/calculation for the width of text object before creation/insertion? At now I used approximated width size via a simple .
 
(Defun GetStrWidth (str H W) (fix (*(* H W) (strlen str))));;usage: (GetStrWidth "This is a Text." 2.5 0.8);;H: TextHeight; W: width factor. 

I know that for the existed text in drawing I can use textbox command, but for the texts that has not been created, what can I do? Is there any formula/calculation depends on font name, text height and width factor?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Move All 3.5mm Text To Layer Text 3.5

Sep 12, 2012

We are using autocad 2012.

Is there a way to move all 3.5mm text to layer text3.5 and move all 5mm text to layer text5.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find All Text In Selected Items And Swap Text

Oct 25, 2012

A program that prompts:"select objects:" then I can select some objects like as text, line, circle,... after that program find all texts in selected items and swap text

swap means:   xxx/yyy ===> yyy/xxx ;    "/" is a divisor

swap function for one text is here:

(defun c:swap ( / pos ent el txt)
(vl-load-com)
(if(null #div#)(setq #div# "/"))
(setq #div#
(if(=(setq tmp(getstring(strcat "
Divisor character: <"#div#"> ")))"")
#div# tmp
)

[Code]....

but I want a program to prompt me like this:

(prompt "Select objects:")(terpri)
(setq a (ssget '((0 . "TEXT"))))

and gets divisor char </>:

after that:

(setq n (sslength a))
(repeat n

....

)

repeats n times, n=number of texts in my selection

View 6 Replies View Related







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