AutoCAD Visual LISP / AutoLISP :: Determining Number Of Lines In Multiline Attribute
Sep 26, 2013
I am basically trying to determine how many lines are in the mutliline attribute. I have abandoned the idea of directly trying to find the the number of lines and have moved on to trying to fine the height of the multiline attribute. I have included the lisp and sample drawing that will draw a box of the boundingbox around the mutiline attribute.
This block as originally a dynamic block that different visual states. I have tried using the bounding box option on the block itself, however, if there are blocks hidden with the visual state, it will draw the bounding box according to the largest element in dynamic block every time. So I need to determine the height of the multiline attributes instead and adjust the dynamic block accordingly.
View 3 Replies
ADVERTISEMENT
Jul 23, 2012
significance of extra dxf 1 groups in the entity data of a multiline attribute? I am looking at one for the first time, so I don't know whether or not to expect multiple 1 groups. In the single example I have created there are two and the first one seems to be ignored. Can I count on that being the case all the time? Data for the one I'm looking at follows, and what shows up on the drawing display is only the contents of the second dotted pair with 1 as a key.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
((-1 . <Entity name: 7ec37d18>)
(0 . "ATTRIB")
(330 . <Entity name: 7ec37d10>)
(5 . "323")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
[code]...
View 9 Replies
View Related
Oct 19, 2012
I have some multiline attributes that contain strings that are longer than 250 characters. how to empty the attribute using autolisp?
View 4 Replies
View Related
Jun 19, 2012
I have a simple hexagon block with one attribute, i need to be able to copy it and as i do it increases the number by one.
the Block name is note1-2006 the attribute name is NOTENUM. I have tried using some other Lisps but i cant ge them to work. Sometimes i have to put 40 of these on a sketch i hate copying and changing the attribute by one everytime. so it would be nice to copy and as i pick mutliple spots it increase number. Dont know if there is a way to ask user to keep same number or increase. This would save me so much time.
View 9 Replies
View Related
Sep 8, 2011
I have a simple block that consists of a point and an attribute that contains the point number. I want to generate a table with point number from the attribute, and x, y and z of the block's insertion point. I want a routine that sets out the blocks and then create the table. The first part of the routine I have (in LISP), I need it to generate the table. I was intended to use the -DATA EXTRACTION but unfortunately it does not allow me to select objects (blocks). Are there other ways to do this? I'm using AutoCAD 2011.
View 5 Replies
View Related
Nov 11, 2011
I currently have a LISP routine that will replace the value of a specific attribute name with sequential numbers in the order that the blocks are selected. Like TCOUNT for attributes - and it only looks for a specific attribute Tag Name called "ID".
However, what I want it to do now, instead of just putting the number into the attribute value, I want the number to be a suffix to the existing default tag value of the tag named "ID" which is "ADDRESS:" for some blocks and "ELEVATION:" for other blocks but the tag name that the routine always has to filter for is "ID". That way the user can pick anywhere on the block - not being forced to pick the tag we want to add numbers to.
What I need the new LISP to do is append a space and then a number to the existing tag value in the block, so that the result would look like "ADDRESS: 1", "ADDRESS: 2", "ADDRESS 3" or "ELEVATION: 1", ELEVATION: 2", etc. depending on whatever the default value for the tag "ID" is.
there are several hundred different block names - but they all have a Tag Name of "ID" - whose default value is sometimes "ADDRESS:" and sometimes "ELEVATION:".
View 8 Replies
View Related
Feb 21, 2012
I have blocks that were created on one layer but inserted on another layer. So, when i turn the layer off that the blocks were inserted on they remain visible because you have to turn off the layer they were created on to have them disappear. Is there a way for me to determine what layer the blocks were created on?
View 9 Replies
View Related
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
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
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
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
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
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
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
Nov 2, 2012
i want to select a block and the lisp copies TAG1 into my clipboard (i want to paste it in excel)
View 9 Replies
View Related
Jul 17, 2013
Lisp or lisp code for sum attribute tag values and paste result to an another attribute block tag?
i attached jpg for explain to what i want to do .
View 4 Replies
View Related
Mar 29, 2012
I need fix a block attribute named "NrPunct.dwg"
MyProblem: after I insert the block “NrPunct” in my drawing ,, I cannot modify "textHeight", when I edit the ATTDEF (or attribute) with the command “DDEDIT” . Why?
You see my arrow in the picture pozamea.jpg…
View 2 Replies
View Related
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
Sep 30, 2013
Is there any simple code for to sum length of lines which is i am choosing and copying result to chosen attribute tag ?
View 1 Replies
View Related
Dec 15, 2011
(cdr (assoc 1 (entget (entnext (car (entsel))))) ...
gives the string value of the attribute, but i would like to retrieve the field value attached to that attribute.
View 3 Replies
View Related
Jul 6, 2012
I am trying to customize AutoCAd for a special domain where attribute values need to have a type. I can have a clean integrated solution by manipulating the acad.dcl or base.dcl .I am using AutoCAD 2012 . I want to extend the " define attribute" and "edit attribute" dialog boxes to promt the user for a value type when they define an attribute .I can't find the definition for these dialog boxes in acad/ base dcl files. Ideally I want to add another tile definition to these dialog boxes .If that is not possible atleast spawn a different dialog box from the "define attribute " dialog box that will collect the value type from the user.
View 2 Replies
View Related
Jul 16, 2013
I am trying to update my Title Block with a LISP routine (As the title implies).
So far, this is what i have...
(defun c:aTest (/ ss att)
(if (setq ss (ssget "X" (list (cons 0 "INSERT")(cons 2 "TB_PARAMOUNT_ELC")
(cons 66 1)(if (getvar "CTAB")(cons 410 (getvar "CTAB"))
(cons 67 (- 1 (getvar "TILEMODE")))))))
(progn
(foreach ent (mapcar 'cadr (ssnamex ss))
(setq att (entnext ent))
[Code]...
The title block, block name is static. The attribute name is static.
My ultimate goal is to copy the value of one attribute and "paste" that into the value of another attribute, and itterate this through the entire project.
View 9 Replies
View Related
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
View Related
Oct 30, 2012
I want to edit 1 attribute value in a block to number all my blocks (eg A001, A002, A003...) (example picture attached)
I know about the at tout and at tin but I need a lsp routine that only changes one attribute value without having to double click and go through that.
i attached a lsp routine, how to edit and remove everything except the value part.
View 9 Replies
View Related
Apr 24, 2012
From what I can gather the attributes of a MVBlock are on the Viewblocks inside of it.
With LISP, how can I access these attributes to get and set them?
View 5 Replies
View Related
Oct 26, 2012
Any routine where I could keep picking on my exit arrow blocks (showing how many persons exiting from each space) one-by-one and the program would add up the numbers. For example I pick on blocks with numbers of 2, 4 & 3 and I would get 9.
View 3 Replies
View Related
Apr 13, 2011
I have several lisp routines that we have used since release 12 that now dont work in 2012. They all placed blocks with attributes, allowed user to fill in and continued to finish. In 2012 the attribute dialog box does not come up and point information for block placement is filled in the attributes. Is there a system variable that changes dialog boxes in 2012?
View 7 Replies
View Related
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
Jul 5, 2012
i am wondering if it is possible to alter a specific attribute in cca 250 files? I have this template which has like 50-70 attributes,but not all of them are used. I have to change only one attribute in all of the files. For instance, i have an attribute with a specisfic tag, but the content of it is ie MARK, i want to change MARK to PETER, without having to open,click,retype,save,close every file. Is it possible to automatize it somehow? maybe lisp, batch or even VB?
View 2 Replies
View Related
Aug 30, 2011
How would one modify
(= (cdr (assoc 0 data)) "ATTRIB")
in order to filter for a certain attribute tag named MYTAG
I am working with a custom LISP routine which reports out to a CSV file, an attribute extraction file - but I need my routine to ONLY evaluate blocks which have the MYTAG attribute tag. Then, if it passes that first check, it evaluates another list of Tags within those blocks - a list of tags which I have specified elsewhere in the code.
I am trying to modify my existing code as little as possible, and I think that if I do it at the line (which I've pasted above) - that will "pre-qualify" my selection set....
ATTACHED LISP IS THE FILE I AM WORKING WITH --- THE ACTUAL LINE I WANT TO MODIFY IS AT:
"(while (eq ENSUB "ATTRIB")"
View 3 Replies
View Related
Feb 3, 2012
I'm looking for a lisp routine that will globally list all the values from a specific attribute tag within a specific block. The attribute tag is "COMMENT" and the block name is "FSD".
View 9 Replies
View Related