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


ADVERTISEMENT

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 :: 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 :: 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 :: 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 :: 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 :: Sort Through A Database And Rename Layers

Apr 5, 2013

I'm new to working with scripts and have played with it a little bit but my knowledge is severly lacking, I picked up script pro and have had some success batching simple commands.

What I have is a large database with differing layer convensions that I want be able to run a script that will open rename layers save and close, the layers are not of the same name but similar enough that I could set peramiters for less then a duzon layer names and catch my target then rename it to a standard, for example "A-wall exterior" to "A-WL-EXT", a simple enough command but within the database the "A-wall exterior" could be one of a duzon simmilar names.

My thought was to run the -rename la "layername" "layername" qsave script but when the original layer is not found it gets stuck untill script pro times out and fails. If there is some way to search out names and once found rename that would work.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Check Attribute Of Block With External Database

Mar 2, 2013

I have a block with:

tag1: XX

tag2: YYYYYY

tag3: ZZZZZZZZ

I have an external file check.txt with string:

XXYYYYYYZZZZZZZZ

I would like to create a lisp program that check the attributes of block using an external database, if tag1+tag2+tag3 = XXYYYYYYZZZZZZZZ ok end program, if not  make a circle on block :

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Visibility State Name From Uname?

Jan 2, 2014

(Part of a table that shows the block in the first column the block name in the second and the count in the third)

(IF (SETQ ss (SSGET "x" '((0 . "INSERT") (2 . "PoolLight,`*U*") (410 . "Model")))) ;| <- Just an example the full blocklist is much longer and not all are dynamic |; (WHILE (SETQ Ent (SSNAME ss 0)) (SETQ BlkName (CDR (ASSOC 2 (ENTGET Ent)))) (IF(SETQ tempList (ASSOC BlkName EndList)) (SETQ EndList (SUBST (CONS BlkName (1+ (CDR tempList))) tempList EndList)) (SETQ EndList (CONS (CONS BlkName 1) EndList)) ) (SSDEL Ent ss) ))

getting the visibility state name for each instance of a dynamic block. The blocks display properly with the count, but the block name displays the Uname - *U59, *U61, *U66, *U68, etc...

(Also, why LISP created tables always seem to force a Title or Header no matter how I try to supress it?)

(VLA-PUT-TITLESUPPRESSED TblObj :VLAX-TRUE)(VLA-PUT-HEADERSUPPRESSED TblObj :VLAX-TRUE)

Both seem to have no effect. If I don't include one extra row to the table then it fails to populate all together. 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Blocks Visibility To Text?

Mar 16, 2012

I wonder if it is possible to have a routine that captures the visibility name of a dynamic block and place it in a text in the drawing?

For example, I have a block with 10 visibilities. I copied this block 10 times in the project and I put each one with a different visibility. Now I would like to make a label with the name of each visible state next to each block.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting Dynamic Block Visibility?

Aug 17, 2011

Attached is a lisp that reads an attribute block value and uses that value to set a named view. The attribute block is a diesel expression field which reads the drawing number, so it changes as the drawing is saved to a new number. I use it when I am preparing road alignment drawings. I prepare the first drawing in the set, saving views for all drawings and when I'm done I copy that drawing 001 as many time as I need, rename them drawing 002, drawing 003 etc. and use the attached lisp with scriptpro to set all my saved views.

I also have a dynamic block called "key" in the drawing with visibility states matching the named views.

either expand this lisp or create a new lisp to set the visibility using the "VN" variable.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Search Database / Tables To Determine If New Layers Present In Drawing

Dec 6, 2013

Is there a way to search the database/tables/whatever to determine if new layers are present in a drawing?

I want to run a script to reconcile new layers in the sheet drawings after having cleaned the xref drawings, and the script bombs if there are no new layers present in the parent drawing.

If I could determine what triggers the layereval/layernotify sequence (tblsearch?) I could include an if or while lisp routine that would invoke the layer command and then reconcile the new layers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Blocks Change Visibility State

Nov 1, 2013

I have 4 Dynamic Blocks with the same name, but each are on different layout pages. I need to change the visibility state of all 4 to the same value. So far every attempt of mine has failed.

My process at this point is to: build a selectionset of all 4 Dynamic Blocks with the same effective name, convert the selectionset to a list of entity names, then use a foreach to change the visibility states one at a time. Currently, I get "error: bad argument type: lselsetp <Entity name: 7ffff7b6c90>". <Entity name: 7ffff7b6c90> is the entity name of the first block in the list. I'm guessing it's because the block is found on a non-current tab
 
(defun chgdynprop (e propname newval / obj v vval sal tot i) (setqobj (if(= (type e) 'vla-object) e (vlax-ename->vla-object e))) (if (= (vlax-get-property obj

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert Dynamic Block With Visibility State Pre-selected?

Dec 24, 2013

I currently insert certain dynamic block into drawings with a short function that first inserts the specified dynamic block and then immediately changes the visibility state to one specified as an argument to the function.

I'm wondering if it is possible / better / faster to somehow insert the dynamic block with the decided visibility state simultaneously. I've been amazed by many capabilities of VL so I wouldn't at be surprised if this can be done. (the dynamic blocks I'm inserting could have many multiples in the drawing but I need this method to only affect the one being inserted at the time the function is called. I currently use entlast to decide which one is being inserted.)

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Blocks Not Changing Visibility State With Automated Process

Oct 6, 2011

I have created a bunch of templates (title block type drawings) for my company. In these templates there is a dynamic block used for a particular note. Based on customer number, this note will be changed.

We have a program that will insert the correct template based on the drawing type. It will know the customer number and change the dynamic block visibility state to reflect the correct text in the note.

Here's the problem; I don't know why, but sometimes the visibility state does not change. It's not the code as it works just fine in some drawings.

I've gone in and just changed the visibility state name, then changed it back, then saved the drawing and it worked.  In some cases, I've also just gone into the template and deleted the dynamic block and re-inserted it, and it began to work again.

Having trouble with dynamic block visibility states not working when using an automated process?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Invisible Attribute Constant Dynamic Block Visibility State?

Jan 24, 2013

I have a dynamic block with several visibility states, and each visibility state has one invisible-constant attribute. I can't seem to wrap my head around dynamic blocks well enough to get the value from the active visibility state invisible constant attribute. I know how to get the visibility state like this:

(setq ss (ssget "_x" (list '(0 . "INSERT") '(2 . "`*U*,<DynBlockName>") (cons 410 (getvar 'ctab)))))

 but what next?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Searching For Dynamic Blocks With Visibility Perimeter That Is Case Sensitive

Dec 19, 2013

create a routine to list all the dyanmic blocks in my drawing with a specific visibilty parameter name. The problem with the blocks that I'm trying to search for in my draiwng is that the visibility names are very similar with the only differences being CASE sensitivity (ie. OBJECT vs. Object).
 
(defun c:test (/ BNAME DATA E I PNAME SS VIS) (if (setq data nil vis (getstring T "
Enter the Visibility Parameter Name: ") ss (ssget"_X"(list (cons 0 "INSERT") (cons 2 "`*U*")) ) ) ;; setq (progn (repeat (setq i (sslength ss))(cond ((and (setq bname(vla-get-EffectiveName (setqe (vlax-ename->vla-object (ssname ss (setq i (1- i)) ) ) )) ) (setq Pname(car (vl-remove-if-not '(lambda(j) (eq (strcase (vla-get-PropertyName j)) (strcase vis) )) (vlax-invoke e 'GetDynamicBlockProperties) )) ) (not (member bname data)) ) (setq data (cons bname data)) (foreach itm data (print itm)) ));; cond );; repeat );; progn );; if (if (null data) (princ "
Block/Parameter Name not found")) (princ))

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







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