AutoCAD Visual LISP / AutoLISP :: Extract Attribute Tag Value And Draw Polyline

Apr 25, 2012

I have a inserted block with 4 tags for Length, Thickness, Elevation and Width.How can extract attributes tag values and draw a closed polyline + 2 internal lines, parallel to the block?

Block Name: ID_DATA
Tags: LEN, THI, ELE and WID.

Each internal line placed in a third width.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Extract Field Expression of Attribute In Block

Mar 8, 2012

Is that possible to have a lisp to extract the Field Expression of a attribute in a block?Specifically, to extract the property VALUE (TextString) of this attribute.After to extract, I would like to put this text extracted in a different layout tab, in the same drawing. In this way, I will have a text linked to the attribute value between two layout tabs. So, when I have to change the attribute value, the text will be updated automatically.

I know that if I use the FIELD command to manually copy and paste this value it will work, but when I have a lot of attributes it becomes very laborious.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Evaluate That BOTH Attribute Tags Exist In Block And Extract

Sep 15, 2011

I was wondering if it was the COND statement that I would need to use to evaluate a block to confirm that two attribute tags existed  and if so, if would process the block to perform an attribute extraction of both of those tags. It would ignore blocks that only had one or the other attribute tags - and only extract the attribute values if the block had BOTH of the tags present - It could be blank, but it had to exist.

For example, I want to find blocks that have the attribute tag "PART_A" and "ID" - and then create a CDF that has the value of "PART_A" in the first column and "ID" in the second column. Then it closes my CDF file.

Then, I want it to scan my drawing again for blocks that contain attribute tag "PART_B" and "ID" and then re-open that CDF file and append the values so that the values of teh attribute "PART_B" is in the first column and the values of the tag "ID" are in the second column.

I have been playing with the following code --- is there anyway to modify the code to get it to do what I need? I have already removed the part that writes the header-row....

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Polyline With Clipping Outside

Mar 7, 2012

is there a way to draw a polyline and have autocad clip everything outside of that polyline and discard it so that i end up with a smaller drawing.  only the information in that polyline, nothing outside of the polyline

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Draw Polyline Between Two Blocks Of Same Name

Nov 13, 2013

i need a vlisp program to draw polyline between two blocks.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Polyline Which Point From Sub-entities Possible?

Jun 28, 2013

I continue learning....

(setq ins (vlax-ename->vla-object ( ssname sele cod)) nombre (vla-get-name ins) ) (setq bloque1 (vla-item (vla-get-Blocks (vla-get-Document ins) ) nombre ) ) (setq s_ent1 (vla-item bloque1 1)) (setq pt1 (vla-get-startpoint s_ent1 ))(setq pt2 (vla-get-endpoint s_ent11 ))(setq s_ent2 (vla-item bloque1 2)) (setq pt3 (vla-get-startpoint s_ent2 ))(setq pt4 (vla-get-endpoint s_ent2 ))(command "_pline" pt1 pt2 pt3 pt4 "c")

Why dont draw de _pline?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Polyline Objects - Draw MLINE

Sep 2, 2013

I have drawings with a lot of polyline objects. I need a routine which will draw multilines by coordinates of vertexes of this polylines. For example, if there is a pline with coordinates 10,10 - 20,20 i want to draw in other layer MLINE with the same coordinates. I know it's should be simple but can not gues how to do it. I've never used LISP before.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Read Attribute (diameter) To Draw Circle?

Oct 21, 2013

Can a AutoLISP command be written to read an attribute in a block and draw a circle with the attribute as the diameter using variables? The appilcation is taking the diameter of a tree trunk (the attribute), multipling by 12, and drawing the canopy circle on hundreds of those blocks. So the circles drawn will vary in size.

Not sure how this could be set up, i'm not familiar with LISP writing at all.

1) Read block, single, mulitple or definition?

2) Read Attribute

3) Varaible of attribute, (attribute is an inch measurement...it needs to be multipled by 12 to get feet for final use as circle diameter drawn)

4) Draw circle, variable, with diameter coming from attribute variable (attribute in inches that is multipled by 12)

5) Center point or circle to be block's base point

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Reduce Polyline With Multiple Vertices To Single Polyline

Jun 7, 2012

I would like to take all the vertices out of a multiple-vertices polyline so that it reduces to just its start and end points, can this be done?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 3D Polyline To Polyline To Spline With Max

Sep 21, 2013

Due to modeling purposes, I need to convert a 3D polyline to a spline. What I have been doing is:

- change polyline fit/smooth to cubic from properties
- convert polyline to spline by typing spline -> object
- method -> fit from properties

You can see the original 3D polyline (green) and the resulting spline (magenta) in the attached drawing.When I zoom in and measure the distance between the two entities at different points along them, at some points the perpendicular distance exceeds 5 millimeters, and I want to ensure the deviation remains under 1 millimeter or even less.

I know I can change the knot parameterization of the spline, and this does work at some locations, but the difference increases at others.Why is there a 5.6 mm difference between the spline fit point and 3D polyline vertex, as measure in the attached drawing?

Now, I can go and manually stretch the fit point to coincide with the vertex. Also, I can add fit points between existing ones to drag the spline closer to the original 3D poly.

However, some of my polys are really long, and it is very time-consuming to do this manually while measuring points along the entities to make sure the distance stays small enough.

how to automate this process? For example a lisp that would maybe take the original vertex points, add say maybe 3 (not too many) new ones between them, and then generate a spline while making sure the deviation is less than the set value of 1mm? I am using AutoCAD 2013.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Transfer Attribute Block Values To Another Attribute Blocks

Jul 3, 2012

I wanna transfer my attribute block values to another attribute text blocks , is there any lisp for that?

Is there a possibility for sum tag values of choice attribute blocks to inside of another attribute text block ?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Attribute Tag Into Attribute Value?

Dec 8, 2011

Background: Someone exploded an attribute block and copied it hundreds of times throughout a project, each time changing the Attribute Tag to match the Value they expected to appear in their drawing.  The drawing must be xrefed, so the attribute definitions do not appear.

(There is only 1 attribute in the block.) 

Proposed Solutions:

1:AutoLISP routine which copies Tag data from Attribute Definition into Value of Attribute Block:

Prompt-Select Attribute Definition

Copy Tag data

Prompt-Select Attribute Block

Paste data into Value

(Allow repeat to speed workflow)(*PREFERRED*)

2:AutoLISP routine which copies Tag data from Attribute Definition into Default Value and creates a new Block:

Prompt-Select Attribute Definition

Copy Tag data

Paste data into Default Value

Create New Block

(Select Multiple Objects)(Creates tons of new blocks which are messy)

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Label From New WCS

Jun 4, 2013

I need a lisp routine that will allow me to pick a polyline and label with azimuth and distance (direction-north, clockwise) of a new WCS.

Is there any code that extract information for a new WCS?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Image Name From WMS

Nov 25, 2013

I have a drawing that has an aerial Images inserted into it using a WMS Connection How to extract Image Name through Autolisp from this

View 5 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 :: 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 :: Extract A Folder Name Within Dwgprefix

Aug 17, 2012

I’m looking to extract the second from the last directory within the dwgprefix of

"P:Projects66 Structural666-4800-00 TPA666-4815-00 Res4815 Res Figures"     (i.e. 666-4815-00 Res) 

This is what I have so far:

(defun c:tmp ( )
(setq P1 (getpoint "
Pick point: "))
  (command "text" P1 "" ""
    (strcat
      (vl-filename-base
        (vl-string-subst "." "\" (getvar 'dwgprefix) (vl-string-position (ascii "\") (getvar 'dwgprefix) nil T))
   ))))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Elevations Of Polylines

May 28, 2013

A quick lisp routine to extract the elevations of a selection set of 2d polylines?  I have a massive "contour" file composed of 2d polylines with elevations.  I need to find the min and max polyline elevation in selected areas.  I can't figure out how to extract just the elevations of my selected polylines so I can quickly see the elevation values? 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Linetype From DWG File

Sep 12, 2013

I've got a linetype that's part of our autocad template file and has been for so long that nobody around here even knows where the original line file is.

I need to extract the linetype out so that I can make some minor modifications.  I did do a search and found a nifty lsp routine from Paul Turvill.  (Here's the thread that pointed me there:  [URL] ..........

I ran it and it SEEMED to work.  All the linetypes in the file it created look good EXCEPT for the one I needed to extract. That one looks like this in the line file:
 
*TREELINE,Series of arcs used to indicate tree drip lines
A,0.0001,-0.0001,

The linetype DOES display properly in the dwg file (meaning lines drawn using it look good).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Attribute Value

Jun 3, 2013

I am trying to find a lisp that would get an attribute value (tag name = NBR_5) . I'm trying to run a simple routine that would let the user place the value from the titleblock attribute as text on a drawing. I see a ton of articles regarding getting attributes but I am not well versed in programming.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get The Value Of Attribute

Dec 30, 2011

Is there a quick way of getting the value of an attribute?

I have an attributed block called "tp_attributes" and it has and attribute called "OrderNum".

I just want to be able to quickly grab that value.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Extract Values X Y Z From Vlax-3D-point

Jan 3, 2012

how to extract value X Y Z of point p3 p4

(defun c:test ()
  (vl-load-com)
  (setq actdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
  (setq objm (vla-get-ModelSpace actdoc))
  (setq obju (vla-get-Utility actdoc))
(setq oldhigh (getvar "Highlight") oldsnap (getvar "Osmode") oldblip (getvar "BlipMode") oldecho (getvar "Cmdecho") );setq
(setvar "Highlight" 0) (setvar "Osmode" 517) (setvar "Cmdecho" 0)  (setvar "Blipmode" 0)

[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Any Way To Extract All Dimension Text At End Into Excel

Aug 16, 2012

I'm dimensioning an old drawing with the real (measured) dimensions and with the drawing dimensions in brackets (using ' 1500 (<>)' to give '1500 (1505)' for example.

What I'd like is to also be able to put on the difference between the length I type in and the length in brackets - as this would let me see any really glaring errors that can't be attributed to user-error on the laser measure.So I could type in '1500  (<>) (X)' where X is the formula, and get ' 1500 (1505) (5)' back?

How to be able to run a script that could highlight any dimensions where the number is brackets and the typed number have a a difference of, say, 50.Or failing that, any way to extract all the dimension text at the end into excel so I can see the differences myself?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Check Block Attribute Then Change Different Attribute In Block

Aug 31, 2012

select all blocks on certain layers in a drawing, check attribute CIRCUIT in each block if it starts with MS then attribute CONTROL = switched. I hope thats clear enough the way

(defun c:control()
(graphscr)
(Setq sc (ssget "X" '((0 . "INSERT")

[Code].....

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Enames Of Each Polyline

Apr 26, 2013

this is a Offset cutting plane line I want it to be all polylines but I can't get the ename of the end points of the polylines dose anyony know how

(defun ccp (/ pt2)
  (SETVAR "CMDECHO" 0)
  (setvar "angbase" 0)
  (setvar "angdir" 0)
  (command "polarang" 1)
  (setq pt1 (getpoint "

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Sum Of Polyline Lengths

May 21, 2012

Is it possible to determine the sum of the lengths of all of the polylines on a certain layer?  I'm trying to determine the total length of joint sealant on a building's exterior.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Z Value Only On 3D Polyline

Aug 23, 2012

I am using acad 2010. I have a contour generator that uses 3d polylines to make contours. I get depressions or tops where I don't want them. I need a lisp routine that will allow me to adjust the z value only on any 3d polyline. I need to raise or lower the z value at any vertex and repeat if necessary. I don't need to prompt the user- I am the user.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Polyline Elevation

Jul 19, 2013

I create contour line in TOPOGRAPH program, and I import these polylines to AUTOCAD. I have to set elevation for each polyline manually, and I waste a lot of time doing that.

So looking for lisp doing that automatically. I mean, invoke the command, set the first elevation and them select the polylines.

e.g. The first elevation is 530. The next polyline that I select is 531 and so on. 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Region To Polyline

Feb 17, 2009

For the sake of editing, I sometimes make LWPOLYLINES and convert them to regions so that I can union and subtract and intersect, etc.

then sometimes, like now, I want to work with them like as LWPOLYLINES again.

is there some command I don't know, or some routine or shall I make one?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Sum Of Attribute Values

Jul 29, 2005

Say I have a block that contains two attributes, one contains a value that is a number and another contains a value that is letters. I have many of these blocks placed in a drawing, could you create a lisp that would return the sum of the number value and return it to the command line along with the letter value. Something like this:

Sum--------Item
128 RP
389 TD1
2389 SP4

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Get Attribute Value From Block

Jun 17, 2013

I continue with my problems.....

I get attribute value from block and put it in a list:

(repeat (setq cnt (sslength sset))
      (setq attValue (GetAttributeValue (ssname sset i) "tag1"))
       (setq attValue2 (GetAttributeValue (ssname sset i) "tag2"))

 [Code]...

When I try to put them in a table...

 (foreach item lst
        (vla-setText mytable
                     row 0
                      (last item)
                    )
        (setq row (1+ row))
      )   

only put  one ( attValue2) at column, and i like  put 2 values, each one in a column in the same row

View 9 Replies View Related







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