AutoCAD Visual LISP / AutoLISP :: Change Attribute Text

Jun 24, 2012

I have a block "MANAGER" with Two Attributes "CETOP" and "CEBOT" I would like a lisp to replace what ever is in those attributes with defined text, for my purposes "Text1" and "Text2". I would like a simple routine that even I can understand so I can apply it to a couple of other lisp projects I have.

View 6 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Change Attribute Width

Jan 9, 2013

I found this routine [URL]...... that changes the width of an attribute in a block. After use it, I need to use the ATTSYNC to update the other instances of the bloc in my project.

How to modify this lisp that I receive a prompt to choose if the width attribute will be change just in the selected block or in all instances of the block? In that way, I would not have to use the ATTSYNC command each time.

View 7 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 :: Change Font Of Named Attribute Throughout Drawing

Sep 25, 2012

how to change the font of a specific attribute in all my blocks in a drawing.  I am trying to change the INST attribute font to Arial but I have thousands of them through out my project.  My other attributes that I do not want to change are using the same Style as this block so I can not simply change the style.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Global Attribute Change Multiple Drawings

Feb 6, 2012

We have a few hundred drawings that we need to change certain block attributes. We need to change the valve of the text in that attribute from whatever it is (doesn't matter what it is) to a specific text string.

For example: If the attribute is called "name" and has the text string of ALAN in it in some drawing or BRUCE in other drawings, we want to chaneg all drawings to TOM.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute For Only Items Visible On Screen

Mar 30, 2012

im trying to change an attribute for only items visible on screen why dose the follow in then work and the one there after not?

(command "_attedit" "N" "N" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))
(command "_attedit" "N" "Y" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))

View 4 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 :: Change Block Layers Based On Attribute Name Tags

Oct 11, 2011

What I am trying to do is grab the value of the owner tag (of which there are four), and use that value to determine which layer to place it on.  What it seems to be doing is hanging.

Here is what I have so far:

(setq SSBlks (ssget "x"'((0 . "*INSERT"))))
(while (/= (sslength SSBlks) 0)
(setq w(sslength SSBlks) V 0)
(setq attentity (ssname SSBlks 0))
(setq attname (entget attentity))
(setq cntr 0)
(while (< V cntr)

[Code] ......

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Multiple Paper Space Tabs

Apr 12, 2012

Is there a way to change a specific attribute in a block found over x-amount of papers pace tabs?

At current I can only change one tab at a time.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rotating Attribute Text Horizontal

Oct 27, 2012

I would like to globally rotate an attributes text to be horizontal. When a block containing and attribute is inserted at a rotated angle the attributes text is of course also rotated - The tag is called circuit so I tried this - need some lisp to alter the size of the text?

(prompt "
Pick your Blocks..")
(setq ss (ssget '((0 . "insert")))
sl (sslength ss)

[Code] ......

having tried this which did not work

(prompt "
Pick your Blocks..")
(setq ss (ssget '((0 . "insert")))
sl (sslength ss)

[Code] .....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Block Rename To Attribute Text Value

May 17, 2013

I wanna change my block name to attribute text value, any similar lisp code?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Edit Attribute Text In Multiple Drawings

Sep 16, 2012

I need to be able to batch process a bunch of title block attributes automatically.

Block Name: Title Block

Tag Name: SH

Currently they come out with just the number 1, 2 , 3 etc I need to add a leading zero ie 01, 02, 03 etc

All the scripts I have will just replace the number with another

I just want to append the zero infront of the existing number

ie the code will need to read the existing number and decide if its less than 10. if it is less than 10, then the code just needs to append the leading 0. if its 10 or over, then do nothing.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Losing Text Style When Use Entmod On An Attribute

Feb 25, 2013

I have a lisp function that is updating attribute values on a newly inserted block. The lisp function uses entget to read the attribute. Then it plugs a new value into the assoc 1 using subst, then uses entmod to update the attribute's value. It all works fine except that the attribute loses its style, i.e. assoc 7, somehow. If I do an entget on the attribute right after the entmod the assoc 7 is nil. The symptom on the drawing is that the attribute value is not visible until I close and open the drawing.

This only happens on a newly inserted block on existing drawings. If I close the drawing and reopen it then the lisp function works fine. Or If I insert the same block on a new drawing it all works fine. what would cause the assoc 7 to go missing after an entmod to change the attribute value?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Text To Attribute Inside Block

May 3, 2013

Looking for routine for converting text to attributes inside the block?

In my drawing I hv some attribute blocks having some Text in it. I need to change the Texts inside the blocks as Attribute Texts. I am attaching sample Blocks drawing..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Export Title Block Attribute Text

May 9, 2013

How to export title block attribute text .. in a order from different layout .? file ext .xls or .txt  i got a tool named Autocad Automation tool but it not work very well autocad have data extraction - its also came all text .. and not in order .. can we develop the any lisp for that ?.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Fields Into Text In Specific Attribute Tags

Jan 6, 2014

Convert Fields to text in my Title Block. I want to change some specific attributes only to convert into texts in my title block ( "MODE_A3" is my Title Block name).

For example in "MODE_A3" block having lots of tags like TAG1, TAG2, TAG3 upto TAG10 with fields. I need to change TAG3, TAG4, & TAG5 attribute fields into texts in all layouts.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Selected Text To Tagged Attribute Including Prefix / Suffix

Apr 5, 2013

I have very little knowledge in complex Autolist routines and routine to do the following:

I would like to be able to provide a Prefix and/or Suffix via dialog then pick any line of text or multiple lines of text and have it concentrate.  For example:  Prefix:  First Floor Suffix: M100.  I pick the room text on an arch floor plan "Mechanical room" and the second line "100"  The result will be "First Floor Mechanical room 100 M100". 

But lets take it a final step further; once condensed, I want it added to a perticular tag attribute in a block I inserted.

Example of how I would use it.  I insert a symbol for an addressable smoke detector that has several tags; one of them being Location.  I would use this routine to gather the information provided by the Arch floor plan and join it with the block attribute for exporting later for use in the Fire Alarm Panel Programming.

attached is a sample block with the attributes.

View 9 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 :: Attribute Blocks - Change 1st Tag Values Automatically According To 2nd Values

Jul 18, 2013

I have an attribute blocks and this att block has two tag values , is there a simple code for to change 1st tag values automaticly according to  2nd values ?

for example :

1st tag (50x50) - 2nd tag ( 100 )    ==> 50x50-100

if i enter 201 valuse to 2nd tag then 1 st tag has to change as 100x100

if i enter 501 valuse to 2nd tag then 1 st tag has to change as 150x510

I attached a jpg file for explain much better

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Text Style

Dec 16, 2013

I am trying to put together a LISP that changes the font of two text styles. One bing  named "Standard", and the other "WD".

This is what I have so far...

(defun C:CHANGESTYLE (/ entities len count ent ent_data ent_name new_style_name)
(command "STYLE" "Standard" "Romantic" "" "" "" "" "")
(setq entities (ssget "X" '((0 . "TEXT")))
len(sslength entities) count 0);

[Code]....

 I couldn't figure out how to select mtext and text all in one swoop, so i ran it twice 

Now, when i run this code, i get the following error "lselsetp nil".

CADMASTER TECHNOLOGIES, LLC
[URL]....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change This LSP Text Back To ASCII

Dec 10, 2013

I have this old lisp routine that I have been using for quite a while and it works and loads just fine, however I would like to open it to see/edit the code... when I open in Notepad however it opens with wierd symbols... How to get this back into normal text?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Table Text In One Time

Jul 21, 2012

I want to change a lot of table cell text in one time, try to explain something.

In the front of my drawings i have a view tables. in the second column stays a code that represent a location.

e.g. LVC stays for Low voltage cubicle. Now it is my intention to substitute these code to the description of code in one time and only the second column. The several descriptions are written in an .txt file, like LVC;Low voltage cubicle and on the next row LVP;Low voltage panel, and so on.

I think it is only possible with Lisp? or there are other way?

In the past i did it one by one, because mostly there where 2 or 3 tables, now i have a big project with more than 20 tables.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change A Specific Attribute From Specific Block To Specific Value

Dec 7, 2011

I've had a simple lisp I've been using for years that suddenly disappeared.  It required that you identify a block name, tag name, and the value that you want the tag to be.  All of this is performed via command line, so it is scriptable.  Since I lost it, I've been experimenting with -attedit.  This command comes frustratingly close to what I'm looking for, except it only appends an existing tag, or replaces a specific string within the tag; I can't get it to replace the entire tag, regardless of its value.

1> Any lisp routine that does what I describe?
or
2> How to make -attedit replace a tag value without regard to what the value currently is (like a * wildcard)?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change 6 Sided Polygon To Circle Around Text

May 29, 2012

I have a window schedule lisp routine that places a 6-sided polygon around text that label each window.  I want to change the code so that its a circle instead of a polygon.  Here is the code line that needs to be modified:

(command "polygon" "6" "fro" (cdr (assoc 10 (entget templine)))(strcat "@38,-" (rtos (+ (* linecount 18) 14) 2 0)) "C" "6")

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Font Style Of 1 Text Item?

Sep 9, 2010

im my current coding project im attempting to change the font stlye of 1 text item

i tried used the simple method of

[code]

(command "STYLE" "simplex" "ARIAL" "" "" "" "" "")

[/code]

however, using this changes the text's font in the whole drawing

i searched the forums here and everything i found either didnt work or changed all the text.

is there a more elegant way of doing this with just a selected text item and not the text in the whole drawing?

View 7 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 :: Copy Text Or Line Then Change Its Color To Green

Mar 29, 2013

I'm looking for a way to copy a text or a simple line, circle... ; after I copied it, the last entity change its color to green.

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







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