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
ADVERTISEMENT
Oct 7, 2013
Is there a way to programatically set a visual style before a drawing actually opens?
We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings. Some models will crash on some workstations when trying to open in a rendered mode.
I found a lisp with a function that looked to set viewport visual styles. But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)
View 9 Replies
View Related
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
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
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
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
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
Jun 14, 2009
how create lisp convert text (from drawing) to excel
View 6 Replies
View Related
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
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
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
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
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
View Related
Jul 18, 2012
I have to go into approx 600 3D Models and rotate them all by 90.
I've just tried to search for a lisp that will do this to all of these files in one directory and can't find one. Something that will do this and save loads of time. I need to do this tonight so that these MEP files will all be ready for tomorrow morning.
View 1 Replies
View Related
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
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
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
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
Nov 6, 2013
(setq plist (vl-directory-files (getvar "dwgprefix") "*.dwg" 1))
(foreach ins1 plist
(setvar "lispinit" 0)
(command "open" ins1)
(command "insert" "C:UsersasmoleyDesktopBSK100_BD" "0.875,0.28125")
(command "save" ins1)
);foreach
(setq plist nil)
bad variable name in SETQ and malformed string on input errors.
View 1 Replies
View Related
Jan 22, 2013
I have a lot of drawings with two tables in them, and they are all over the place.
I'm able to change the columns widths using the following
(setq PipeList (vlax-ename->vla-object (car (entsel))))
(vla-setcolumnwidth PipeList 0 0.25)
(vla-setcolumnwidth PipeList 1 0.25)
(vla-setcolumnwidth PipeList 2 2.0)
(vla-setcolumnwidth PipeList 3 1.5)
(vla-setcolumnwidth PipeList 4 1.625)
(vla-setcolumnwidth PipeList 5 1.0)
(vla-setcolumnwidth PipeList 6 1.75)
I'm wondering if I could modify the assoc 10 value to a specific point of '(8.5 10.3675 0.0).
View 3 Replies
View Related
Nov 6, 2013
I have some drawing that contains PHANTOM2 linetype.
I can't delete this linetype from my drawings!
View 9 Replies
View Related
Aug 2, 2013
Any way to insert a block onto many different drawings quickly? I have a title block I need to insert into about 100 drawings. It seems very tedious to open each drawing and insert 100 times.
View 3 Replies
View Related
Dec 5, 2012
I have the following string of code, that I'll write in everyone's start-up suite. I'm able to retrieve a list of files I want to modify, for whatever reason. (One example, when plotting drawings with layouts, sometimes the shadeplot setting is wireframe, and not classic hidden, though it's been set up in our templates).
The huge question is, can I get a list of drawings to a variable in one drawing, and have access to that variable list, in the next drawing I open? I'll iron out the bugs on read-only statuses, or manipulating drawing states later.
(defun GetDrawings ()
(setq currentpath (getvar "dwgprefix"))
(command "pspace")
(setq DrawingList (dos_getfilem "Select a file" currentpath "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||"))
(setq ListOfDrawings (cdr DrawingList))
(setq DrawingPath (nth 0 DrawingList))
[code]...
View 1 Replies
View Related
Dec 31, 2013
I searched the groups and the closest discussion I could find was here but there didn't seem to be a clear cut solution. [URL]. I have a jpg file that I needed to apply some transparency to and saved it as a png file. I now want to delete the jpg file from the folder but it's being referenced in several drawings, and I don't know which ones. Is there a way to reverse the function of Reference Manager (perhaps with a different app), ie find all the drawing files that reference my jpg file?
Intel i7 3.33Ghz, 16Gb RAM
Nvidia Quadro 2000D
C3D 2012 SP4, holding off on C3D 2014
Win 7-64
View 3 Replies
View Related
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
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
Mar 10, 2004
I am trying to create a lisp to delete all the empty layouts from mydrawings. I do not see any code to control this.
View 8 Replies
View Related
Nov 6, 2012
Any lisp routine on how to change "Drawing Properties" (fields via Mtext) on multiple single drawing files?
There are several instances where we would need to take a project to create another one and simply change the title block description.
As of now, we are opening each drawing (there could be hundreds) and modifiying the drawing properties on each drawing to change the customer name and other project descriptions.
These are not attributes, but fields. I've researched alot on here and couldnt find anything.
The drawing is attached.
View 3 Replies
View Related
Feb 7, 2013
i am working on writing a lisp to update several similar drawings through a .bat file. One of the things i would like to do is to automatically increase the revision number by one. I have figured out everything except how to select the text. Looking at the database, the coordinates for the revision number are (10 15.2908 0.0295 0.0). However, (setq a (ssget "x" '((0 . "TEXT,MTEXT")(10 15.2908 0.0295 0.0)))) returns nil.
If each drawing's revision number is not in the exact same location, is it possible to select by a range of coordinates? Using (getpoint), the range is from (15.5 0.0 0.0) to (15.1805 0.1409 0.0).
View 9 Replies
View Related
Aug 10, 2013
I have a csv file that has the drawing names and their layout names listed in columns A and B. Before I begin a project, I have to create the Sheet List (in Excel) and the csv file. The csv file is needed because I have a lisp routine that reads the csv and updates all my Title Block attributes in all my drawings. (VERY sweet program) What I'm wanting to do, is create new layouts (using my dwt) based on the information in the csv file. So, when I start a new project all I need to do is create the base drawing files first. Then, in my csv file I've got those drawing names listed in Column A and their corresponding sheet titles (Layout names) in Column B. I run the lisp and it reads the csv and creates layouts in all those base drawings and naming the layouts with the sheet titles from column B.
Column A Column B
DRAWINGS SHEET TITLES
drawing1.dwg A100
drawing1.dwg A101
drawing"n".dwg "n"500
Etc, etc.
I'm needing a way to automate creating hundreds of layouts at once. (very time consuming).So the lisp has to be able to read a csv (or Excel--doesn't really matter) and create new layouts (using my dwt) in as many drawing files represented in column A. [and filtered so it doesn't create duplicates so I can run the routine at a later date when new sheets are added to the drawings] Captcha?
View 1 Replies
View Related
Dec 3, 2012
I want to put the list of open drawings (like the window tab on the menubar has) onto the ribbon? Is this possible?
View 2 Replies
View Related