AutoCAD Visual LISP / AutoLISP :: Text Files From MDB

Aug 29, 2012

I have an mdb database, with one table called MATRIX. That table has seven relevant fields, see attachment. What I want to have is for every language an txt file.

Like for example:

DUT.txt
2BK1;BATTERIJKAST sBk
2RK1;REMKAST sBk

and so on

ENG.txt
2BK1;BATTERY CUBICLE sBk
2RK1;BRAKE CUBICLE sBk

and so on

ITA.txt, the same
DEU.txt, the same
ESP.txt, the same
FRA.txt, the same

View 2 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Selected Text(s) To CSV Files

Nov 14, 2012

I need a LISP program that prompts: "select text(s)" then I select for example 100 text in open drawing file.

after that this program creat a file (LIST.CSV) and write each selected text in line by line of this file:

result text file (LIST.CSV ) should be:

Text1

Text2

Text3

...

...

Text99

Text100

 ofcourse Text1 is the content of a text object.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change One Text Inside files By Running simple Script

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

AutoCAD Visual LISP / AutoLISP :: Convert DGN Files To DWG Files?

Feb 8, 2013

I want to convert my DGN files to DWG files.

So I write this code in LISP:
 
(defun C:Batch_DGN2DWG (/path dgnfile SDI_Mode) (setq path "C:\DGN\" ;;Default path for DGN files location. DGNIMPORTMODE 0 ;;Imports the DGN file in a new drawing file. SDI_Mode SDI ;;Save Current SDI MODE SDI 1 ;;SET Single Drawing Mode for AutoCAD. );;setq (foreach dgnfile (vl-directory-files path "*.DGN" 1) (progn (command "-dgnimport" (strcat path dgnfile) "" "" "" "y" (strcat path dgnfile ".DWG")) (delay 100) );;progn );;foreach (setq SDI SDI_Mode) ;;restrore SDI Mode to previous value.)

but I can't finish it!

I attached some DGN files for test purpose.

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

AutoCAD Visual LISP / AutoLISP :: Using TEXT Not MTEXT To Create Multiple Lines Of Text?

Oct 4, 2011

3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error. The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.

I’m playing round with a loop but how to achieve my need..He had a 3rd party tool which didn't match our scaling needs the file is a fas so I have tried to reverse engineer the whole function using trial and error.

The following code works perfect except we need multiple (x amount) lines of text I have at current the M txt function which mimics and is effective for today however we need all lines to be individual.
 
;Starting lisp program...(defun C:REDtext ();Creating Layers (if non existant)...(command "layer" "m" "TEKST-1.5mm" "lt" "continuous" "" "c" "1" "" "");Memorising previous layer...(setq MYOLDLAYER (getvar "clayer"));Setting requierd layer...(COMMAND "LAYER" "SET" "TEKST-1.5mm" "");Setting variable "MYHEIGHT" to "DIMSCALE" x 2...(setq myheight (* 2 (getvar "DIMSCALE" )));Requesting and storing usser defind point...(setq MYPOINT (getpoint "Start punt :")); Requesting and storing user defind text...(setq MYTEXT (getstring T "Nieuw tekst :"));Placing text...(command "text" MYPOINT MYHEIGHT "0" MYTEXT); Restoring previous layer...(setvar "clayer" MYOLDLAYER);Closing lisp program...)

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Multiple Text To Heal Instead Of Single Text?

Aug 1, 2013

this code is used to fix specific font but its problem that it will prompt you to select single text 

i need to make it to select multiple text so it saves me a lot of time, 

;;; Process Individual request
(defun cht_ProcessIndividual ()
(setq sslen (sslength sset))
(while (> sslen 0)
(setq temp (ssname sset (setq sslen (1- sslen))))

[Code]...

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Text Formatting Style Inside All Text Contents

Aug 4, 2013

I have inside every text,Mtext contents different text style like Arial_1 , Arial_2.

How i can give all the contents inside one style ? the normal procedure i will enter inside text to enter editing mode and changing text format style one by one. I  want it once.

I want to save my routing of entering every text to change its content text style.

(Notice:select all from outside without editing mode will not do the job)

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Z Value From Text

May 10, 2012

I have text objects with the same Z value and I will select as follows:

(setq sstxt (ssget '((0 . "TEXT")(8 . "APS-text"))))

How to store this value in another variable "zvalue" to apply to:

(command "change" "select text objects" "" "_p" "_e" zvalue "") ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Managing VLX Files

Jan 25, 2012

How to manage VLX file, when i drag and drop one in acad , then type the command it works fine but then

  - creating a pgp alias : doesnt work , uinknown command

 -  load vlx and launch command from a lisp  : does nothing 

am i missing something ? are there other options ?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Avoid DCL Files

Apr 23, 2012

I am running autocad 2011 for mac to design sails. I was given a autolisp file that will automate the majority of the process, but it uses a .dcl file to input all the numbers. Unfortunately .dcl files are not support with the Mac version and therefore I am looking for any solutions. 

- Is there another way to input the information and therefore link the lsp file to something different?
- Is it easy to re-write the lisp file and input directly into that?

At the moment the time I am wasting researching how to make the .lsp program work, I could have hand drawn most of the sails anyway!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Loading Old FAS Files

Mar 24, 2012

If it is possible to load old r14 FAS files into more recent ACAD versions, will it work on r2012 f.e.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing DXE Files

Mar 15, 2013

I have a drawing with DXE files in xrefs. I am not able to remove these references. How to Remove the DXE files from Xref.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Of Routines With DCL Files

Aug 8, 2012

I have writted a set of lisp routines with dcl files that I have implemented in most versions of Autocad since release 14. I can install the toolbars in Autocad 2013 but when I try to execute on of the commands, either by toolbar icon or command line, I get the message "Unknown Command".

I have added the appropriate paths to path list.

Dell Precision M4400 Laptop

Vista Business

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text With Bounding Box

Jan 13, 2012

I use the bounding box (vla-getboundingbox) to assess parameters of blocks.  These blocks have text on some of the faces that extends beyond the simple dimensions of the blocks themselves.  I'm wanting to have bounding box ignore the text and can't sort it out.  I've tried putting the text on a separate layer and turning it off and freezing it.  

 I've considered looking at sub entities and filtering out the text but I don't know if there is a solution here or not.  

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: ID Duplicate Text

Jul 24, 2013

This is a routine that draws a line between duplicate text.

Would it be possible to have the line as bold red p-line so that its easier to identify.

;; This AutoLISP routine examines all the user-selected TEXT and MTEXT items,
;; and draws a line on the current layer between any two that have identical
;; string values.
;; Leading and trailing blanks spaces are ignored.
;; %% modifiers, like %%u, are not ignored.
;; Upper- and lower-case differences are not ignored.

(defun c:fdt () ;;Find Duplicate Text

(prompt "Select text items to examine: ")
(setq ss (ssget '((-4 . "<OR") (0 . "TEXT") (0 . "MTEXT") (-4 . "OR>"))))

(setq n 0)

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Alphabetize Text

Oct 7, 2013

I've looked around several places for a LISP that will alphabetize existing text. I cant seem to find what I need. I am looking for a routine where I can manually select text in a given order to get the outcome of AA,AB,AC,AD, or BA,BB,BC., etc.

I've attached a drawing to better explain what I am looking for. I do not know how to write LISP routines, but I know a little to be able to modify an existing one.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Leader With No Text

Nov 27, 2011

I'm trying to create a leader with no attachments. Code below. But I can't seem to shut of the Annotation Dialog.

(setvar "cmddia" 0)

(vl-cmdf ".Qleader"     "S"     "A"     "N"     pt1 pt2   ""  )

Also I am trying to create a leader with text that is aligned and above the leader line.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Arc Text Exploding

Aug 16, 2011

I have encounter some text exploding problem. As shown in attachment, I would like to know if there any possible way I can explode the text into polyline or single line and maintain it within the position and style?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Chinese Characters In DCL Files?

Jan 19, 2012

I have some legacy custom .DCL files that we want to convert the user interfaces (text boxes, labels, etc) to Chinese characters.  Is that even possible in .DCL?

I have gotten our NET and VBA apps converted but not having much luck with the DCL files.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Put LSP Files In Tool Palette

Mar 3, 2013

How do I have a .LSP file load automatically when I open autocad?And how do I put .LSP files in the tool palette?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Save Many Files In DXF Format?

Aug 30, 2012

Routine to select DWG files in a folder and save these files in DXF format?

1) Select files in folder;

2) Open select files, save each in dxf format; If there is already a dxf file with the same name, replace.

3) Close files.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Files Same Attribute In All

Jul 5, 2012

i am wondering if it is possible to alter a specific attribute in cca 250 files? I have this template which has like 50-70 attributes,but not all of them are used. I have to change only one attribute in all of the files. For instance, i have an attribute with a specisfic tag, but the content of it is ie MARK, i want to change MARK to PETER, without having to open,click,retype,save,close every file. Is it possible to automatize it somehow? maybe lisp, batch or even VB?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Script On Multiple Files

Feb 7, 2012

I have a lisp routine that gathers all xrefs from the current drawing and creates a script that opens each xref, runs specific commands then saves/closes each drawing. Once all commands have been ran in each xref I would like the script to reload all xrefs in the original drawing that the script was called from. I have a reload-all lisp that is already loaded in all of my drawings but for some reason when this command is called at the end of the script it will not run.

Is there a way to have the script continue to run in the original drawing that it was called from? Or maybe even pass control back to the lisp that created/called the script? Its seems to me that the easiest thing would be to have the script continue to run after it has gone through all of the specified drawings but this is not working.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automate Options -> Files Changes

Aug 17, 2012

As you can see, if i rename this to "acad.lsp" and put it in the network search path of AutoCAD users, it will update several settings in their Options > Files. WHAT A TIME SAVER THIS HAS BEEN!

What i want to do now is to set the "Default Template File Name for QNEW" but i don't know how to complete this line:

(vlax-put-property AcadFiles ___________ <variableName>)

How to fill in the blank?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Substituting Text With Attribute?

Apr 29, 2013

I run into some issues where i need to change an attribute based on where a block is located on a drawing.  I started this routine to select the block, and then select the text that I want to change the block attribute to.  It seems like everything is working up until this point.  What I want to do is then replace the first selected with the second selection.  How would I go about doing that?  here's my code so far:

(defun C:uf ()
(if (setq fuse (nentsel "
Select Fuse Attribute: "))  
(progn     
(setq en (car fuse))    
(setq enlist (entget en))      
(setq fuseatt(cdr (assoc 1 enlist)) )   )  )      
(if (setq mt(car (entsel "
Select Text: ")))  
(progn          
(setq enlist2 (entget mt))    
(cdr (assoc 1 enlist2))     
(setq wiren(cdr (assoc 1 enlist2)) )     )          )
)

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Go From TEXT And LINES To TABLE?

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







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