AutoCAD Visual LISP / AutoLISP :: Change Table Text In One Time
Jul 21, 2012
I want to change a lot of table cell text in one time, try to explain something.
In the front of my drawings i have a view tables. in the second column stays a code that represent a location.
e.g. LVC stays for Low voltage cubicle. Now it is my intention to substitute these code to the description of code in one time and only the second column. The several descriptions are written in an .txt file, like LVC;Low voltage cubicle and on the next row LVP;Low voltage panel, and so on.
I think it is only possible with Lisp? or there are other way?
In the past i did it one by one, because mostly there where 2 or 3 tables, now i have a big project with more than 20 tables.
View 9 Replies
ADVERTISEMENT
Oct 3, 2012
Is it possible to create a lisp that would change the plot style table? I don't know of any variable to type to change that. We convert drawings from Solid works to AutoCad and use the basic monochrome plot style. I'd like to easily change that since the act of doing that is repeated many times.
View 1 Replies
View Related
May 6, 2009
The PARTS LISTS on our old drawings are simply text entities and lines. Some are MTEXT. But our new drawing template has us creating our parts list using the actual AutoCAD TABLES entity.
I'm looking for the best method to go from lines and text in AutoCAD, to an AutoCAD table. As of now, I have to retype everything since I can't select a column/row or group of text entities, copy/paste into a table.
Any LISP function that will allow me to go from TEXT and LINES to a TABLE? I've tried B2E (lisp name) but it's not working - found that on a lisp site somewhere.
View 9 Replies
View Related
Nov 23, 2011
The following snippit of code is changeing the color of text in a cell of an AcadTable. It will set the color to an RGB value and works great. But what if the color is a normal color 1 through 255 from autocad's pen table. How would I set the cell text color?
(setq objColor (vla-getcellcontentcolor eVLAMT R C)) ;sets a Color Object, whatever that is
(vla-setrgb objColor RED GRN BLU) ;sets the new color of the Color Object
(vla-setcellcontentcolor eVLAMT R C objColor) ;sets that new color object to the cell
View 5 Replies
View Related
Oct 22, 2011
Run TIME command and then take the resulting text and save it to a file.
Ideally, the text file should be named based on the drawing name. I know there's ways to write text to a file but I haven't had any luck taking the output of a command and exporting it.
View 9 Replies
View Related
Jun 24, 2012
I have a block "MANAGER" with Two Attributes "CETOP" and "CEBOT" I would like a lisp to replace what ever is in those attributes with defined text, for my purposes "Text1" and "Text2". I would like a simple routine that even I can understand so I can apply it to a couple of other lisp projects I have.
View 6 Replies
View Related
Dec 16, 2013
I am trying to put together a LISP that changes the font of two text styles. One bing named "Standard", and the other "WD".
This is what I have so far...
(defun C:CHANGESTYLE (/ entities len count ent ent_data ent_name new_style_name)
(command "STYLE" "Standard" "Romantic" "" "" "" "" "")
(setq entities (ssget "X" '((0 . "TEXT")))
len(sslength entities) count 0);
[Code]....
I couldn't figure out how to select mtext and text all in one swoop, so i ran it twice
Now, when i run this code, i get the following error "lselsetp nil".
CADMASTER TECHNOLOGIES, LLC
[URL]....
View 3 Replies
View Related
Jun 29, 2012
I am looking for a way to change the text style used by a table style with Visual LISP. So far I have been able to get the IAcadTableStyle object from the acad_tablestyle dictionary, but there is no property for text style. Is this even possible? Code and results are below.
(defun DumpTableStyles ()
(setq dict (vla-get-dictionaries (vla-get-activedocument(vlax-get-acad-object))))
(setq TableStyles (vla-item dict "acad_tablestyle"))
(vlax-for TableStyle TableStyles
(vlax-dump-object TableStyle)
)
)
[Code]....
View 3 Replies
View Related
Dec 10, 2013
I have this old lisp routine that I have been using for quite a while and it works and loads just fine, however I would like to open it to see/edit the code... when I open in Notepad however it opens with wierd symbols... How to get this back into normal text?
View 9 Replies
View Related
May 29, 2012
I have a window schedule lisp routine that places a 6-sided polygon around text that label each window. I want to change the code so that its a circle instead of a polygon. Here is the code line that needs to be modified:
(command "polygon" "6" "fro" (cdr (assoc 10 (entget templine)))(strcat "@38,-" (rtos (+ (* linecount 18) 14) 2 0)) "C" "6")
View 7 Replies
View Related
Sep 9, 2010
im my current coding project im attempting to change the font stlye of 1 text item
i tried used the simple method of
[code]
(command "STYLE" "simplex" "ARIAL" "" "" "" "" "")
[/code]
however, using this changes the text's font in the whole drawing
i searched the forums here and everything i found either didnt work or changed all the text.
is there a more elegant way of doing this with just a selected text item and not the text in the whole drawing?
View 7 Replies
View Related
Mar 29, 2013
I'm looking for a way to copy a text or a simple line, circle... ; after I copied it, the last entity change its color to green.
View 3 Replies
View Related
Sep 7, 2012
I have approx 20 autocad files and I would like to change one text inside these files by running a simple script or lisp.
View 4 Replies
View Related
May 31, 2013
I have set up several tables inside autocad that have one cell as the input cell and after regen the others perform calculations based on that cell. I want to write a command that uses the same value as the input value to draw the arc to scale. I tried using the table value as is called out in the cell field:
^C^C_arc 36,6;e;0,6;r;Table(8796085192704).A3;.
Is there anyway to get a value from a cell inside autocad and put it into my macro so I can draw an arc of the radius shown?
View 1 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
Aug 29, 2012
Is there a way to unlock a cell using lisp. I have a datalink that is used to create a table. Once the table is selected I have a command that will format some of the cell style (which will let me while locked), but it I cannot seem to find a way to unlock them to merge a couple of cells. I can manually do it using the table toolbar, but programmably I am a little stuck. I can see if it is editable by using the vla-iscontenteditable and it will return :vlax-false. I do not see a vla-setcontenteditble or something to that effect.
View 3 Replies
View Related
Sep 12, 2012
Tables do no have a rotation angle. I can find the insert point, but there is no other point to make an angle calculation with.
(setq objTable (vlax-ename->vla-object (car (entsel))))
(vlax-dump-object objTable T)
View 1 Replies
View Related
May 14, 2012
I have a table, in cell D3 I have inserted a field containing a system variable. The contents of the cell looks like this,
%<AcVar dimadec>%
I want to put in cell D2 the name of the vairable that is in cell D3 - I have tried the following,
%<AcExpr (D3).ObjectName>%
%<AcExpr (D3).textstring>%
Is there any way to reference the name of that system variable contained in cell D3? I want to do this to prevent errors by curious new users that may edit the table, I want the table to reference itself so that the system variable being read is always related to the correct system variable name.
View 6 Replies
View Related
Dec 9, 2011
any code that can search for a layer using wildcards?
In my specific case, I have multiple layers than begin with "MECA" followed by a job code. I'm trying to code something that will check to see which of those layers is on, then return the layer name.
View 1 Replies
View Related
Jun 24, 2013
i have one table make which field from block. Is possible sum?
View 4 Replies
View Related
May 15, 2012
Is there any way to compare 2 cells in a table? I have tried diesel
$(if,$(EQ,%<AcObjProp Object(%<\_ObjId 2128896328>%).b2>%,%<AcObjProp Object(%<\_ObjId 2128896328>%).d2>%),true,false)
I can't seem to pass the cells into the equation. I tried formulas also with no luck.
View 7 Replies
View Related
Sep 24, 2012
I have made a lisp routine to draw lines on polyline. And here are a lot of lines on it. So using comand
"(command "line" pt1 pt2 " ")"
takes a lot of time. Is here a way to creat lines in memory or similar and only then draw them all on screen?
I have search but coudin't find any info. I do not know how to formulate a query.
View 9 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
Aug 19, 2013
I have created subroutines to build tables in AutoCAD.
What I would like to do is to is if a value in the table list (example a question mark), then make the background color of that cell color 1 (red).
List to insert as a table -
(setq List_Table (list (list "A" "?" "C" "D" "E") (list "11" "12" "13" "14" "15") (list "21" "22" "23" "24" "25")))
(Build_Table "Title" List_Table 3 5 0.1 1)
Here are the subroutines -
(defun Build_Table (TableName List_Table NumRows NumColumns RowHeight ColWidth /); P0 Table_Obj KW KK KT KL Blocks_Obj Block_Obj Block_Id)
;--set table scale-------------------------------------
(setq Dscale 1.0)
;--get location----------------------------------------
(setq P0 (vlax-3d-point (getpoint (strcat "
[Code] .......
View 3 Replies
View Related
Apr 26, 2012
How to modify the column widths of an ACAD_TABLE?
I have known co-ordinates that I want each grip for the table to be set at. I can't just copy and paste the table from drawing to drawing. Each table of each drawing have different textual values, and the column widths will best be sized for each text value.
View 5 Replies
View Related
Oct 1, 2013
Any LISP routine that I can run that will make alternating rows of color in a table?
I can setup a table with the TABLE command and setup the rows to alternate gray and white, but if I add or delete a row, the alternating background fill pattern gets messed up (see attached example). Manually redoing the pattern isn't bad for a few rows, but for 30 or more it's a real pain.
If I could run a command that would activate a routine that would start with gray at the top and then alternate white and gray for every row for the rest of the table, that would be awesome.
View 3 Replies
View Related
Sep 9, 2011
trying to delete a file every time CAD is fired up and/or a new drawing is opened. i cannot make it work so far. planning to incorporate it into acaddoc lsp file.
(defun deletestupidfile()
(vl-load-com)
(setq myname (getvar "loginname"))
(if (= (getenv "PROCESSOR_ARCHITECTURE") "AMD64")
(progn
[code]...
View 5 Replies
View Related
Jun 9, 2012
How do I pause for a certain length of time 5 seconds or 10 seconds.
View 6 Replies
View Related
Sep 8, 2011
I have a simple block that consists of a point and an attribute that contains the point number. I want to generate a table with point number from the attribute, and x, y and z of the block's insertion point. I want a routine that sets out the blocks and then create the table. The first part of the routine I have (in LISP), I need it to generate the table. I was intended to use the -DATA EXTRACTION but unfortunately it does not allow me to select objects (blocks). Are there other ways to do this? I'm using AutoCAD 2011.
View 5 Replies
View Related
Aug 29, 2013
I've been up and down the forums looking for some direction or programming code for this to no avail.
What I'd like to do is edit a table where the cells are populated with fields. I'd like to copy the last row of the table to a new row (fields and all), then change the fields of the row I copied FROM to text, and lock those cells.
I'd like to copy this row including the fields to a new row beneath it. Then edit the cells of the first row to change the fields to text, and then finally lock the cells of the first row so that only the new row would update when the field properties change. Eventually they will be populated with data from the Vault..
View 6 Replies
View Related
Jan 4, 2013
I want to create a table with all characters inside a font.I used "%%" to change a number to it's character.but "%%" limited to 999 and for numbers bigger than 999 it doesn't work.
also, CHR command limited to 255 and for numbers bigger than 255 it change to (number-255). so I used "%%" to create this table:[Please change default font in your AutoCAD to ARIAL]
(Defun c:charmap ()
(setvar "cmdecho" 0)
(setq cnt 1.0)
(setq r_cnt 0.0)
(setq ts 32)
(setq x 0.0)
(setq y 0.0)
[code]...
I want to know:
1- what can I do for numbers more than 999?
2- How can I know the number of characters inside a font?
3-how can improve my LISP program to have complete characters inside the fonts?
View 2 Replies
View Related