AutoCAD VB :: Pass Data From VBA To LISP?

Aug 5, 2011

 I installed AutoCAD 2012, under the function, passing data from VBA to LISP, with the 2008 was working perfectly, now with 2012 no longer works.

I read in the Local Variables:

SymbolName ="#ListaNomi" is ok
value ="()" is ok
Sym = Nothing
VL is ok by me "Visual Lisp"

[code]...

View 1 Replies


ADVERTISEMENT

AutoCAD .NET :: Pass String With Quote Marks To Lisp Command

Aug 10, 2012

I have created a string:

strAttValue = ("3/16""=1'-0""")

or alternatively I've tried:

strAttValue = ("3/16" & Chr(34) & "=1'-0" & Chr(34))

that I would like to pass to a lisp with the format:

(defun lispTest ( strAttValue / )

but when I do it errors with "Too many variables." The passing method is as follows:

acDoc.SendStringToExecute("(lispTest" & Chr(34) & strAttValue & Chr(34) & " ) ", True, False, False)

If I get rid of the quotes in the original string it works fine, but the quotes are needed.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Tangent Line And Pass Through Two Points

Aug 20, 2012

We have a need to select a tangent line/polyline etc and then select two other points we would then like to have the program draw an arc through the two points and yet still be tangent to the initial line/polyline that we picked.  We don't care what the radius is as we believe there is only one solution anyway.  It would be wonderful if we could just use the Arc command and select start>Second Point> then just use the Tangent Osnap but I guess that is out of the question :-)

The only code that I have come across that even resembles this only allows for one point not two (STILL VERY HANDY AND VERY SLICK)

(vl-load-com)
(defun near_vertex_arr (obj / dxf_obj e_next obj_vlax pt_sel par pt_first pt_snd i bulge)
;bruno.valsecchi

[Code]....

How does everyone else hande this?  By they way... I dont care what language it is written in :-)

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Pass Command Line Variable

Mar 21, 2012

I have this small lisp routine:

(defun c:1p nil
(command "_.-plot" "yes" "" "controls 11x17" "Ledger (11 x 17)" "inches" "LANDSCAPE" "NO" "view" "01" "FIT" "CENTER" "YES" "newpap2.ctb" "YES" "As" "NO" "NO" "yes" )
(princ)
)

I want to use it to plot different views which I will append to the command when it is called from within AutoCAD.This code will, of course, print view one.Currently my worst case is 25 views and, for that situation, I have simply repeated this code 25 times with a different function name an view number for each view. Eventually I would like to make a dialog box that would allow me to select with checkboxes (toggles) the views to print and with a button to print all.

For example, if I wanted to plot view 25, after I had loaded this lisp routine I would enter, on the command line in AutoCAD, the function name ("pp" perhaps?) followed by some variable (in this case 25, but could be any view name. ie. 01, elev, detail) and the view name would be inserted at the appropriate place.

View 3 Replies View Related

AutoCad :: Spline Data Extraction Using Lisp?

Mar 23, 2006

Using autocad 2002, how to extract the control points of a spline drawn and writing into a file using autolisp?

View 4 Replies View Related

AutoCAD Map 3D :: Data Extension Functions Of Lisp In Map Not Working

Dec 1, 2011

I have just upgraded from Map 2009 to 2012 4-bit and many of my lisp programs using map functions do not work.  Is there an explanation for this and is there a new "catalog" of data extension function and such available somewhere?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Data From MS Access?

Dec 19, 2011

I woluld like to use visual lisp to get data from ms access.

I know how to connect to Excel, but is there a similar connection possible for access ?

View 1 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 :: Export Data From DWG To Excel?

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

AutoCAD Visual LISP / AutoLISP :: Accessing Data From An Object

Jun 19, 2013

How to access the information stored with an AcDbScale object using Visual Lisp.  I can convert the vla-object to an ename and then use association codes to extract the data, but surely there's an easier, more direct alternative.

View 9 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 :: Data Populated From List

Oct 7, 2011

In the example given I have two instances to show how unique the information can be.

I would like the left column of words to be some type of drop down or list so that the user does not have to type these for each line. I don't care if it's attribute, text, mtext, just whatever gets it done.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Many Lines With Its Data

May 28, 2012

I want to make many object cooper lines in autocad and each line has some data about its length, size, type etc.  that can then extract to excel as a Bill of materials. 

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Data From DWG To Excel

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

AutoCAD Visual LISP / AutoLISP :: Data Extraction By Commandline?

Aug 1, 2013

Can I run the dataextraction command via a command line and respond to the prompts via lisp or script. In other words is there a commandline version of dataextraction - setting cmddia to 0 doesn't work.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Automated Drawing Using Input Data?

Jul 4, 2013

I would like to automate drawing process for certain data. Using some LISP codes User will be asked to provide some data and using that data an automatic drawing needed to be developed at Drawing editor of AutoCAD. For example;

Enter the width of Sheet: 50 mm
enter the length of Sheet: 200 mm
Enter the sheet thickness: 5mm
Enter type of feed: Automatic
Are there holes in Strip: Yes/No
Specify nu of holes: 5
Position of holes Centre: 5,5
Distance between the holes:  At an interval of 20mm each

I just need a LISP code for such program.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Point As Extended Data?

Jan 29, 2013

I was trying to add a point as extended data to a block.

Therefor i used this data but i get an error every time:
 
(setq lastent (entget (CAR (entsel))))(regapp "list")(setq exdata '((-3("list" (1011 . 3277.82) (1021 . 5782.5) (1031 . 369.5) ) ) ))(setq newent (append lastent exdata))(entmod newent)

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Data To Any Database Application?

Apr 19, 2013

I would like to save the data generated by LISP program at command prompt area to any data base app or any simillar app from where I can retrieve the stored data again in autocad for further usage. 

For example, A LISP program generate the result as shown in above Fig. I would like to save the data of step 5, "Shear force in tonnage is : 50.868" to any database application or any simillar one from where I can retrieve the stores data for further usage.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extracting Data From Excel File?

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

AutoCAD Visual LISP / AutoLISP :: Global Attribute Data Adjustment

Sep 10, 2012

I have attribute data that is entered as a format of 25-6. I need to make these into feet and inches, 25'-6". Is there a way to update these attributes globally or even at least by choosing the block itself? The only thing I can think of is find and replace and I just feel there has to be a better way.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Data Extraction From Polylines And Arcs

May 20, 2013

There is a AutoLISP for extract START and END coordinates in X, Y, and Z planes, and extract length of Polylines and Arcs.?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Data Extraction For Visibility Featured Blocks

Jul 25, 2013

i am searching for a lisp for data extractiion from selected blocks. Here Iam attaching sample blocks drawing for reference. These blocks containing visability features. I need output excel in the below snap shot format.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extended Data On 2D Entity - Filter List

Apr 30, 2012

I use extended data on 2d entity in AutoCAD 2010. In a lisp program, I have filtered with extended data selection. Filters work with entity like: line, polyline and Mline but with insert entity it don’t work.

The end get result for a block :

((-1 . <Nom d'entité: 7ffffbe7d90>) (0 . "INSERT") (330 . <Nom d'entité: 7ffffb039f0>) (5 . "18CA91") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "Fam_POTEAU_ROND_INSERT_021") (100 . "AcDbBlockReference") (2 . "POTEAU_ROND") (10 155239.0 -100209.0 0.0) (41 . 16.05) (42 . 16.05) (43 . 16.05) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0) (-3 ("CREEMET000" (1000 . "Fam021") (1040 . -14.0) (1040 . 434.0) (1071 . 0)) ("CREEMET001" (1071 . 2) (1071 . 3) (1071 . 0)) ("CREEMET014" (1000 . "Poteau rond mixte (a completer)")) ("CREEMET002" (1000 . "_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_-1_-1_-1"))))

The filter list use :

((-4 . "<OR") (2 . "POTEAU_ROND*") (-4 . "OR>") (-3 ("CREEMET002" (1000 . "_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_-1_-1_-1"))))

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extended Entity Data Lost In Files

Jan 2, 2013

Just recently I have noticed a Major problem occurring with Xdata.  My programs that i use XDATA storage in work fine until you save the drawing.  When you call the file back up the Xdata is gone the only thing in the xdata is NameSpace value.  Is this related somehow to a Windows update?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieve Cell Data From Excel File?

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

AutoCAD Visual LISP / AutoLISP :: Read And Write Of Notepad Numeric Data?

Mar 21, 2012

I have some numeric data like 1, 2, 3, 4, 5 in mtext format in autocad drawing file and some numeric data like 1,2, 3 in notepad.

How can i get the remaining numeric data of autocad dwg into another notepad using autolisp or visual lisp

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Data Extraction And Database Visibility Counts

Jul 30, 2013

My goal is to have a quantity count of a specific dynamic blocks visibility state and for it to be updated when changes are made, without having to recreate the Table. I want the total amount to be where I have the Fields.

My test drawing is the perfect example, assuming I have all the items that I need in the drawing. I don't want to recreate the Table and re-link each Field to the appropriate cells of the table. Which no one wants to do. In this test drawing the objects in Blue will be used in the final production drawing.

I noticed if I add a new item or remove an item entirely I'll have to redo the Table and fields. Which defeats the time I'm trying to save.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Importing Data From Database / Spreadsheet Into Polyline

Jun 29, 2012

I have a database with the polyline reference/handle (i.e. '13EE6A') and each polyline has a 'door number' associated with it.

I can easily create a query that produces a table of polyline ref and associated door number.

I need to somehow import that door number into the middle of each polyline on the drawing - i.e. if there is a polyline with that handle, put the associated door number in the middle of the polyline on a certain layer. I do NOT need an active link between the database and drawing - it's just to initially populate several thousand rooms numbers!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Hidden Data And Reduce File Size

Mar 27, 2013

I am trying to reduce the drawing file size.  This is for uploading the drawings to AutoCAD WS.  AutoCAD WS doesn't display or edit a drawing that is over 15MB. Unfortunately some of our drawings are over 15MB even after I have removed the background and others and have purged. I believe the reason why a drawing can be so big has to do with each object (grouped object) has a ton of information on it. For example, the properties of a typical object is like this:

( (-1 . <Entity name: 7ffffbece60>) (0 . "PRCD_FITTING") (5 . "145B6") (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 7ffffbece70>) (102 . "}") (330 . <Entity name: 7ffffbf59f0>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BON-SupplyMP-3.0-4.0 RECT") (62 . 1) (100 . "CPrcdEntity") (280 . 10) (90 . 601861454) (70 . 24058) (70 . 4567) (280 . -65) . . Skip 3000 lines here for clarity . (90 . 0) (90 . 0) (90 . 0))

You can see from above that the list of properties are huge.  All I really need are the visible parts of the object.  This means most of the info above are junk.I try to reduce the size of object by exploding all the objects on the drawing.  This sort of work in the sense that the file size of a test drawing is reduced from something like 8MB down to 6MB.  But I am expecting far more reduction than this.  The reason why I expect far more reduction is that the total number of lines of the exploded items of the same object mentioned above is reduced from 3000+ lines to only 300 lines as shown below:
 
( (-1 . <Entity name: 7fffe8654f0>) (0 . "LINE") (330 . <Entity name: 7ffffa1b9f0>) (5 . "3B11F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BON-SupplyMP-3.0-4.0 RECT") (62 . 1) (100 . "AcDbLine") (10 4188.87 -423.095 156.0) (11 4188.87 -387.095 156.0) (210 0.0 0.0 1.0))( (-1 . <Entity name: 7fffe8655f0>) (0 . "LINE") (330 . <Entity name: 7ffffa1b9f0>) (5 . "3B12F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BON-SupplyMP-3.0-4.0 RECT") (62 . 1) (100 . "AcDbLine") (10 4248.87 -453.095 156.0) (11 4212.87 -453.095 156.0) (210 0.0 0.0 1.0)).. Skip 250 lines here for clarity.( (-1 . <Entity name: 7fffe865260>) (0 . "MTEXT") (330 . <Entity name: 7ffffa1b9f0>) (5 . "3B0F6") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "BON-SupplyMP-3.0-4.0 RECT-ANNO") (62 . 1) (100 . "AcDbMText") (10 4193.39 -418.589 150.0) (40 . 3.0) (41 . 19.8) (46 . 0.0) (71 . 1) (72 . 1) (1 . "\Fdim.shx;\W0.7000000000;\T1.0000000000;\o\l24X30THRT") (7 . "BonDuctTXT") (210 0.0 0.0 1.0) (11 1.0 1.46161e-017 0.0) (42 . 17.5) (43 . 3.0) (50 . 1.46161e-017) (73 . 1) (44 . 1.0))

Therefore, I am expecting a 10-to-1 reduction, not just a 1/4 reduction.I am wondering there may be hidden data on the drawing that are left behind after I have exploded the objects. if there is a way to get rid of the hidden data?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Inserting An Attributed Block Using Data From An External Source?

Aug 9, 2013

I am reasonably experienced in coding in VBA but cannot find any references as to how to achieve the above within VBA so am now turning to LISP to see if I can achieve it in that language.

Basically I want to be able to create multiple instances of an attributed block using an external source, e.g. a spreadsheet to provide data for the attributes.

I'm not even sure if this is possible.

I can find lots of references for extracting attribute date to a spreadsheet but I want to go the other way!

View 2 Replies View Related







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