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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Routine To Insert Blocks At Point Locations

Aug 22, 2011

I found this routine but It doesn't work really good (see attachment):

1. We can select block instead of typing the name of it (or simply add this option)

2. That the undo command undo the whole lsp routine instead of undoing all single insertion.

3. That we can Hit the escape key at any point in the routine and it stops the routine correctly instead of writing "too many argu" maybe by undoing the insertion or by stopping the routine correctly at this point.

4. I just found that it does not paste the block directly on the points...? Finally this lsp didn't work at all !

I would like to have a lsp that do SIMPLY this:

1 : Ask wich "points" you want to convert (You know these points that you can change the appearrance in the menu format point style, thats what I mean by "points"). And By the way it would be cool if I could choose to convert the points or to paste my block on those without converting them but it is not that important.

2. Select block in the block listing of insert block popup window and paste it by his default insertion point to all the selected points.

Infos:  New blocks on current layer.

View 9 Replies View Related

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

AutoCAD Visual LISP / AutoLISP :: Modify Insertion Point Of Text

Jan 10, 2008

How do I change the insertion point of a text using "vla-put" ? I've tried using :

(vla-put-InsertionPoint en a)) with a = (4455.94 428.576 0.0)

and I get the following error:

lisp value has no coercion to VARIANT with this type: (4455.94 428.576 0.0)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: One Attribute At Two Different Locations Inside Of One Block

Aug 5, 2011

Is there a way (or a “trick”) to have one attribute at two different locations inside of one block (I want to avoid filling in the same text twice when this block is inserted or edited)?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Substitute Text To Blocks At Point Location

Aug 17, 2012

i found this valuable script Lisp routine to insert blocks at point locations and want to modify it but i do not know much about lisp ...

what i want is :

1) script start and asks for a Block Name (in this case QPP1, QPP2, QS, QE, ect)

2) the user picks existing text  

3) the script reads the value existing on this text an put it in a variable

4) then erases the pre picked text

5) inserts the block chosen

6) changes block value to number value pre-read

since it do almost all steps except for step 3 and 6

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Editing Multi Leader Text Insertion Point

Nov 16, 2012

Is there a way to modify the text insertion point of multileaders using lisp? We have a problem with some of our multileaders getting a landing distance set to a negative value.  My lisp routine will correct these to a default value, but then the text jumps a bit.  If I could get the insertion point prior to changing the landing distance then I could restore that point after changing the landing distance.
 
;;-------------------------------------------------------------------------------------------------(defun c:zld (/ e th dogleg doglegllength sf ss c mlss mlcount) (setqss (ssget (ssget "X" (list (cons 0 "MULTILEADER"))))DWATxtHgt (getvar "userr1")sf 1dogleg (/ 3 32.0)th (if dwatxthgt dwatxthgt dogleg)c 0mlcount 0mlss (ssadd)) (IF ss (while (< c (sslength ss)) (setq e (vlax-ename->vla-object (ssname ss c)) c (1+ c) ) (= (vla-get-ObjectName e) "AcDbMLeader") (progn;;change the dogleglength if

[code].......

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Entity With Options To Type In Text / Pick Point

Nov 6, 2013

I am looking for some code that would allow me to select a MTEXT Entity - or other entity -  (as the DEFAULT option) but also to allow me to type in some text manually or to pick a point in the drawing. Something that would present the user with:

"Select an object or [P to pick a point]"  or

"Select MTEXT or [M to type].

I can write some code to type in text manually as the default option and get the second option to select entity using get string and then write some condition of if code but I don't know how to do it having entsel as default option.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: One Button Changing Text Base Point To Be Middle Center

Aug 23, 2011

how to make a toolbar button so that when i click it and select a few single text, it will automatically change the text base point to be at "MIDDLE CENTER"....

At the moment, i use to create a button with macro of  " ^C^C_text;j;mc "....But the problem is whenever i use this button, i still need to type "MC" at the command prompt.. How to make it so that after i click the button, all i need to to is just select the text..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Writing Elevation Text In A Cad File From Text File

Jun 27, 2012

Write the elevation text in a cad file from attached text file.

In this text file Easting Northing and Elevations are given. We have hundreds of that text files.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Import Layers From A Text File?

Mar 12, 2012

Is there a way to import layers from a text file?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replacing Characters In A Text File

Sep 13, 2012

Replacing characters in a text file.

I solved the following Lisp routine chore. I have this csv file of coordinates (and many more) that comes from a total station:1,100,100,10,50

2,100,200,12,50
3,200,200,12,50
4,200,100,10,51

and should replace the code after the last comma like this:1,100,100,10,.50
2,100,200,12,.50
3,200,200,12,.50
4,200,100,10,..50

To be able to generate the topographic map. And I have this code but does not work properly:

(defun c:cod (/ filename fileopenr readline)
(if (setq filename (getfiled "!!! SELECT *.csv FILE COORDINATE:... ¡¡¡" "c:/" "csv" 0 ))
(progn (setq fileopenr (open filename "w"))
(while (setq readline (read-line fileopenr))
[[code].......

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reading A Line In Text File

Sep 27, 2011

I have the following code which isnt quite working, it reads a text file which has a list of Names of images and their bottom left coordinates i.e. name x y etc. I want it to check for a name equal to that input then in this case alert the user it is found, eventually I want it to load the tile but for the moment where am I going wrong, also the lisp wont close the file and I dont know why.

(defun c:imi ()
  (setq IM (getstring "
Input name of 2010 tile"))
 (while (not (= ""  IM))
  (setq TILE (strcat "BM" IM))
  [Code] ......

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write Several Lines Of Text To TXT File?

Apr 13, 2012

I know how to write a single line of text to a txt file with LISP, but how do i write two or more lines of text to a txt file ussing lisp?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Copy Text String From One File To Another

May 2, 2012

I have spent the last three days writing a lisp program that will copy a text string from one text file and paste it into another.  I have tried using the write-string, getstring, prin1, princ and print functions with no success. 

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write Content Of Variables To Text File?

Feb 17, 2013

I want to write content of variables to a text file but I should have conversion function for variables.

for example

(setq a 123); a is an integer type, contetnt of a is 123

so I should use (itoa a) to get "123" as a string and then I can write it to text file.

but what about another type of variables?
 
(defun ToString ( a / result)(setq result "")(cond((= (type a) 'ENAME) (progn (setq result "Entity names")))((= (type a) 'EXRXSUBR) (progn (setq result "External ObjectARX applications")))((= (type a) 'FILE) (progn (setq result "File descriptors")))((= (type a) 'INT) (progn (setq result (itoa

[Code].....

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Write Unicode Characters To Text File

Jun 27, 2013

I can't write unicode characters to a text file.

as you know, you can write chars on text screen easily: (write-line (strcat "\U+" "2122"))

but if you want to write chars to a text file, this command does not work: (write-line (strcat "\U+" "2122") TxtFileVar)

Here is a part of my code to test:
(defun C:HexGen ( / d f S w x y z h c)(setq d '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F") f (open "c:\0000-FFFF.txt" "w"))(foreach w d (foreach x d (foreach y d (progn (setq S "") (foreach z d (progn (setq h (strcat w x y z)) (setq c (strcat "\U+" h));;;<===character (setq S (strcat S " " (strcat h " = " c ))) ) ) (write-line S f) ) ) )) (close f)(startapp "notepad" "c:\0000-FFFF.txt"))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Print Specific Variable To Text File?

Apr 5, 2013

I'm looking for a way to find out what all plot styles are set in drawings in a sheet set.

We are transitioning from color based pen settings to style based and would like to be able to export a log that shows the variable PSTYLEMODE for each drawing in a sheet set. I plan on using ScriptPro to run it on the full sheet set.

Civil 3D 2013
Windows 7 64-bit
Xeon W3550 3.07 GHz
Nvidia Quadro 4000
12.0 GB RAM

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export TIME Command Results To Text File

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

AutoCAD Visual LISP / AutoLISP :: How To Append To Text File / Record Date Variable

Feb 22, 2012

how to append I’m assuming its not write-line but append line. And also I’m having trouble recording the date variable… I keep getting error bad argument type stringp nil

; Appends usage count by DATE long variable...(setq g(open "C:/ICT/AutoCAD_Architecture_suite_2012/CUSTOM/WOOD Clones/PEN/USSAGELOG.PEN" "w"))(setq MYDATE DATE)(write-line MYDATE g); AS ABSOLUTE LAST WE NEED TO CLOSE THE TEXTFILE...(close g)

I have the following code snippet I’m trying to append the file named USAGELOG.TXT to record the date of executions

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Text File With A List Of Image Tile Names

Jun 12, 2013

I have a text file with a list of image tile names with their bottom left hand easting and northing see attached. I have a lisp that asks for the name of the image then should  insert the image at its coordinate with a predefined scale and rotation but it isn't working so I would like an alternative method to test.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Command Dumping To Text File Locally

Oct 31, 2013

Need a lisp that could dump the values of a list command in a text file placed in a folder C:user121list.txt.

View 9 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 :: Unable To Read Plot Settings From Variable In Text File

Sep 2, 2012

I’m trying to create a plot command that reads settings in from a variable stored in a text file but its becoming muddled up somewhere.

(defun c:MYPLOT ();Setting nessesary variables...(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYOUTPUTDEVICE.PEN")(if(setq f(open fname "r"))(while (setq MYOUTPUTDEVICE (read-line f))(close)))(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYPAPERSIZE.PEN")
[code].......

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 3D Point From X And Y?

Oct 9, 2013

I'm trying to find acceptable point values to feed to the vlax-3d-point function for a vla-addmtext function. With vanilla lisp I just provide the point as x y = "7/32" "2-3/8". So I assumed that I could drop a 0 in for the z like: (VLAX-3D-POINT "7/32" "2-3/8" 0).

Then I thought I was going to be tricksy and try (vlax-3D-point (getpoint)) believing that I could pick the point and get what I need to feed the function, but yet again, no deal. The command line gave me: 

node
of #<variant 8197 ...>

Nothing I can use in my code. So how do I find the point in a format that vlax-3d-point will like?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Put Point At Each End Of Arc?

Dec 19, 2011

What is the magic word for put a point at each end of an arc, the lisp I have only put a point at center of the arc.
 
(defun cAA ( / i j ss e1 e2 p1 p2 p3 points )
(if (setq i -1 ss (ssget '((0 . "ARC"))))
(progn

[Code].....

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 :: No Param On Closest Point?

Jan 4, 2012

Find attached 2 files , a DWG and a LISP

The dwg show a LWpoly, and 3d-poly.

I try to get the param at the closest point, from each vertex at the LW, at the 3d-poly

But as you will see, for some closests point at the 3d-poly there, is no Param

Check at

par+pt@3dpline-list

Here is a short sample

(0.0 598154.0 6.10764e+006 550.0)
(nil 596287.0 6.10656e+006 674.264)
(nil 594548.0 6.10568e+006 624.456)
(nil 594323.0 6.10534e+006 643.747)
(nil 595273.0 6.10224e+006 633.231)
(74.136 595246.0 6.1014e+006 590.0)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting Block On A Point Of Arc?

May 19, 2012

know a lisp routine that would insert a block @ a specific point on an arc? For instance if I have an arc that has a radius of 20'-0" & I want to insert a block at a set distance from the end of the arc.i could probably use the divide or measure command but I was hoping I could do it with lisp. I would also like to be able to move the object along the path of the arc at a specific distance.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Point Data

Sep 18, 2000

I would like a lisp routine that can extract and export the x, y, z coordinates of all the points in a drawing into a text file so I can use the same in excel.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Point Clouds?

Apr 19, 2012

I have a small app to create, related to point clouds.

I know VisualLISP pretty well, definitely well enough to accomplish the task.but...I can't figure out how to retrieve information on the point cloud's clipbox using lisp.

I know a little VB.NET; I took a one-semester class at the JC, two years ago. It's going to take time for me to get ramped up enough with VB to do this job, so I don't really want you to tell me the only way to get to the clipbox is through vb.

way to retrieve and modify a point cloud's clipbox with VisualLISP?

View 3 Replies View Related







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