AutoCAD Visual LISP / AutoLISP :: File To Give Texts A Background

Mar 6, 2013

Lisp file to give texts a background.

It would be great if there is a lisp file that” manages to give all the texts (dimension text, leader text, attributes, regular text, text in blocks, fields, etc.) a WHITE background. This is quite essential since the text should not be overlapped with other objects and must be read easily on the plan sends all text (dimension text, leader text, attributes, regular text, text in blocks, fields, etc.) to front.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Select Texts On A Line?

May 22, 2012

There is a very complecated drawing. Texts are on a line and crossing a line or something like that. Some texts has insertion points on the line. When the line is selected by LISP, only the specific texts with insertion points on the line are selected. Does it make sence?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding A Text To Selected Texts?

Jan 24, 2013

I need a LISP program to add a text given by user to all selected text.

in other words:

1- user selects some texts.

2- user give a text to program.

3- Program added this text to all selected text.

selected text: text1, text2, text3,text4,....,textn

given text by user: _xyz

Result:

text1_xyz, text2_xyz, text3_xyz,text4_xyz,....,textn_xyz

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Mtext Background

Aug 31, 2011

I have a routine, developed for me through this forum, that selects text or mtext, converts to mtext if not already, and puts a background mask with 1.1 border. I was using it fine in Map 3D 2007, but have recently switched to Civil 3D 2012 where it does not work. I get this error message:

; error: no function definition: VLAX-ENAME->VLA-OBJECT

Why does this not work in 2012? How to get it to work?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Table Cell Background Color

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

AutoCAD Visual LISP / AutoLISP :: Alternating Background Fill In Table

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

AutoCAD Visual LISP / AutoLISP :: Changing Blockeditors Background Color

Feb 17, 2009

How to change the Backgroundcolor of the Blockeditor with VLisp? I haven't found neither a SystemVariable nor somthing inside the AcadPreferencesDisplay object.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Color Of Background In Model Space

Jan 2, 2014

Any routine for changing color of AutoCAD background in model space. As for changing background color we have to follow four steps namely as follows:-

1. Execute OP

2. Go to display tab

3. Go to color tab

4. Change color

A tool that directly calls the model color shall be highly beneficial.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Dimension Text Fill Color To Background

Oct 28, 2013

I would like to set dimension text fill color to "background" instead of, you know, dimensioning my drawings properly.

I have this code I got on these forums and it works well except for the 'TextFillColor' variable. I can't find the correct color number or syntax for "Background'. It's currently set to 0 which produces ByBlock, and any number I put in there corresponds to the AutoCAD color number (1 = Red, 2 = Yellow, etc.)

If you have a better routine that you could post that works for me too. Or maybe you could just do my work for me? Even better.

(defun c:test (/ obj num cnt)
(vl-load-com)
(setq ss1 (ssget '((0 . "Dimension")))
num (sslength ss1)
cnt 0)

[Code]...

View 5 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 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

AutoCAD Visual LISP / AutoLISP :: File Not Found (CI)

Sep 21, 2012

Autocad 2008. Certain command and mouse control unable function.. which the error dialog box  shown when start up launch the autocad...

" Customization file load failed. File not found: COMMANDLINE.cui

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Name In A List

Aug 26, 2012

I have a list like ("a.dwg" "b.dwg" "c.dwg") and an filename "b.dwg"

I want to know if the file name is a part of the list. which function must be used for this?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Corrupted LSP File

Dec 31, 2011

my LSP file. My computer is stolen and i have a backup in flash memory. I just wanna run it but i think it is corrupted. When i open it, it has codes like.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bind JPG In Same DWG File?

Sep 24, 2012

Now i attached more logos in the drawing file. The logos all in JPG files.This all jpg files in different locations. Every time i sent file to email attach with all jpg files. Some time i forget the attach files. So i need 'how bind all jpg files in the drawing file'. Now i am working with AutoCAD 2013.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Macro In MNL File

Aug 27, 2013

I used to have a short, one-line macro in my MNL file that would read the location of the currently active drawing, find the parent directory of that drawing (truncated to 3 levels) and open a Word document in that directory that is named after the project.

For example, if the active drawing path is

"Q:/Projects/12345 Cold Storage/Elevations/Phase 1/North Storage.dwg"

this macro would open the Word document named

"12345 Cold Storage.doc"

that was in the directory

"Q:/Projects/12345 Cold Storage"

If the file did not exist, it would be created named the same as the 3rd level directory.

After i wrote this, it sure sounds like a lot, but as i remember, it was a short, one-liner. Of course if a lisp routine would be better, that's okay too. I understand beggars can't be choosy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create TXT File

Apr 3, 2012

Looking for example of a lisp file that take the value of a variable and create a txt file on a specific place defining by the user, with 10 lines in each one of them begins with what is in the variable, followed by a text already done.

View 3 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 :: Opening DWG File

May 17, 2012

Right now I'm working on a program that will go into a directory and it's subdirectories, collect a list of all the .dwg files in those directories, then apply certain changes to all of those .dwg files. 

My problem is that none of these things works.

(command "open" (srtcat basedir (nth i file)))
(command "open" (nth i fullfile))
(vl-cmdf "open" (strcat basedir (nth i file)))
(vl-cmdf "open" (nth i fullfile))

Where "basedir" is the main directory (e.g. C:/...), file is the list of the dwg file names (e.g. mydrawing.dwg), fullfile is the list of the ull paths (e.g. C:/.../mydrawing.dwg)

I have tried using the filename with and without the .dwg extension with no luck. 

I have this code set in (while ...) so that it will go through all the files in the list "file" or "fullfile" in sequence.  The lisp will run without errors but will not open any of the files.  When I look at the command line, I see that the lisp has put open on the command line like it has executed the command, but right below that, it says "Unkown command: C:/.../mydrawing.dwg" or "Unkown command: dwg" depending on which of the above code pieces I'm using.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Doesn't Run

Aug 28, 2013

I have an AutoLisp file that runs fine with AutoCAD Core Console 2013.  It runs fine when loaded through the standard interface of 2014.  However, it does NOT run using AutoCAD Core Console 2014.  I know there are new security features in 2014.  What has to be done to allow it to run in 2014 AutoCAD Core Console?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create VLX File

Aug 6, 2013

how can i create single " .vlx" file from my lisp and dcl files?  how to convert my lisp to vlx ?

i have to collect my all lisp into the single .lsp file and than convert to .vlx? if it is gonna be like that how about dcl file ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create New ARG File

Jul 18, 2012

How to create a new .ARG file

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Embedded Data In DWF File

Mar 18, 2012

I'm looking for a way to add custom data in dwf files. We currently create 3D models which get exported to dwf format so that we can share information with clients. Ideally, we'd like them to be able to click on any member and have the software provide additonal information about that part. Example, part number. It would be awesome if the client could then say double click that part and have the actual detailed part drawing open up.

The parts we are trying to reference are generated using a third party application, so they are not solids, but the information is easily accessible in LISP.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Data From DXF File?

Oct 6, 2011

I am trying to write a lisp file that extracts the LAYER, Z, X, Y, TEXT HEIGHT, POINT NUMBER, from the attached DXF file. Ultimately I will have the lisp insert a "POINT" at the X,Y,Z, cords, and then a "TEXT" entity at the same coordinates with the text height value and the point number string. Both entities need to be on the layer ending in  "-PN". The layer name will change depending on the date. I have a third party program that creates the DXF file.

The point of the lisp file is to insert the point numbers and points into my drawing at their correct locations. For the life of me I can not make this work. I have attached the little bit of lisp I have, which unfortunately does not work properly because of it searching for the "TEXT" entry in the DXF file of which there are three per point number. I only need one. I have also attached the DXF file I have. maybe just an overall procedure that I can then code myself? I'm just not good at getting lisp to read a file and extract what I want from it.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Browse For DWG File Selection?

Apr 15, 2012

To get the 'File Selection dialog box' in AutoCAD via LISP, which command should I use other than 'GETFILED' ?

I have a program which using GETFILED to select the drawing file , but I think this dialog box size is too small to browse folder/file , as you cant see the favorites list and you cant resize the dialog box.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot In A File Some Windows?

Jan 24, 2001

I need to plot in a file some windows from a LISP, like (command "-plot"...

The windows are defined in a list of points like (((0 0 0)(10 10 0))...) defining lower-left and upper-right corners. Each .plt file must be saved with a different name.

Is it possible from AutoLISP in 2000?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting A Block From A File?

Dec 31, 2013

I want to insert a stored block into a drawing (model space).  Below is the code I'm using and I get Runtime Error '5': Invalid procedure call or argument.

Sub Dummy()
Dim COESTD_obj As AcadBlockReference, InsPtStd(0 To 2) As Long, COESTD As String
COESTD = "C:JimHYDROCAD_DwgsBlocksZ_COE_STDS.dwg"
InsPtStd(0) = 0#: InsPtStd(1) = 0#: InsPtStd(2) = 0# 'Set insertion point as 0,0,0
Set COESTD_obj = ThisDrawing.ModelSpace.InsertBlock(InsPtStd, COESTD, 1#, 1#, 1#, 0#)
End Sub

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Deleting Script File

May 21, 2010

I have a lisp routine that creates a script file and then it runs the script file. After the script has finished running, I want to delete the script file from autocad, but for some reason it doesn't delete.

I've tried using (vl-file-delete path).

View 9 Replies View Related







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