Michaels Posted January 4, 2011 Share Posted January 4, 2011 Hello . I looked for a command to explode attribute text but I could not , so is there any lisp that could that job ? Many thanks. Michaels Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 4, 2011 Share Posted January 4, 2011 Why would you want to explode attribute text? What are you trying to do? Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 Nothing , just because I have received a drawing that contains most of its texts are att. text type , and I do like to keep my work under control. Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 4, 2011 Share Posted January 4, 2011 Exploding attributes, in my opinion, is the opposite of keeping one's work under control. What are you trying to accomplish? Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 Yes, I also would like to make them as normal texts because if I wanted to change or to modify texts according to anything that related to the current drawing I would be able to handle that with texts but with Att. texts it is not that easy to deal with . What you think ? Quote Link to comment Share on other sites More sharing options...
eldon Posted January 4, 2011 Share Posted January 4, 2011 Whilst not wishing to interfere with ReMark's attempts to set you on the straight and narrow, have you tried Burst from the Express tools ? Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 Whilst not wishing to interfere with ReMark's attempts to set you on the straight and narrow, have you tried Burst from the Express tools ? Yes I did try Burst command, but unfortunately did not work with it at all . Thanks Quote Link to comment Share on other sites More sharing options...
eldon Posted January 4, 2011 Share Posted January 4, 2011 Is it possible for you to post a drawing with one (or two) of these objects in it, please. Then someone can have a test. Quote Link to comment Share on other sites More sharing options...
pBe Posted January 4, 2011 Share Posted January 4, 2011 Lets be clear Are you talking about Attribute Definition? an exploded attribute? and when you try to edit it you cant put space in the string? because its attribute Tag? Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 You are right pBe . It's Attribute Definition and no space is allowed . Here is a simple dwg Thanks att text.dwg Quote Link to comment Share on other sites More sharing options...
eldon Posted January 4, 2011 Share Posted January 4, 2011 What you have there is the Tag name, and not the Attribute value, so it won't explode or Burst. I seem to remember that dbroada wanted tag values to appear as text some time ago, but I can't remember exactly where. Perhaps he could kindly advise. Quote Link to comment Share on other sites More sharing options...
pBe Posted January 4, 2011 Share Posted January 4, 2011 (edited) Maybe like this? (defun c:TEST (/ xpldat fao fao_pro get_str nmbr) (princ "\nSelect Exploded Attributes")(princ) (setq xpldat (ssget '((0 . "ATTDEF"))) nmbr 0) (while (< nmbr (sslength xpldat)) (setq fao (ssname xpldat nmbr) fao_pro (entget fao) get_str (cdr (assoc 2 fao_pro))) (setq newness (list '(0 . "TEXT") (cons 10 (cdr (assoc 10 fao_pro)))(cons 40 (cdr (assoc 40 fao_pro))) (cons 1 (cdr (assoc 2 fao_pro)))(cons 41 (cdr (assoc 41 fao_pro))) (cons 7 (cdr (assoc 7 fao_pro))) ) ) (entmake newness)(entdel fao) (setq [color=blue]nmbr[/color] (1+ nmbr)) ) ) Edited January 4, 2011 by pBe Missing variable Quote Link to comment Share on other sites More sharing options...
eldon Posted January 4, 2011 Share Posted January 4, 2011 Having had a quick rummage, perhaps this thread would be useful Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 pBe are you trying to replace the Att with a complete text ? That's a very great idea Buddy. I think it would work great without testing it , but there is a small missing variable . (setq [color=red][b]nmbr[/b][/color] (1+ nmbr)) Right ? Thank you Quote Link to comment Share on other sites More sharing options...
pBe Posted January 4, 2011 Share Posted January 4, 2011 pBe are you trying to replace the Att with a complete text ? That's a very great idea Buddy. I think it would work great without testing it , but there is a small missing variable . (setq [color=red][b]nmbr[/b][/color] (1+ nmbr)) Right ? Thank you Aha!!! your're right BaD typist.... Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 Having had a quick rummage, perhaps this thread would be useful Thank you eldon that's almost the same as our thread . Appreciated Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 Maybe like this? (defun c:TEST (/ xpldat fao fao_pro get_str nmbr) (princ "\nSelect Exploded Attributes")(princ) (setq xpldat (ssget '((0 . "ATTDEF"))) nmbr 0) (while (< nmbr (sslength xpldat)) (setq fao (ssname xpldat nmbr) fao_pro (entget fao) get_str (cdr (assoc 2 fao_pro))) (setq newness (list '(0 . "TEXT") (cons 10 (cdr (assoc 10 fao_pro)))(cons 40 (cdr (assoc 40 fao_pro))) (cons 1 (cdr (assoc 2 fao_pro)))(cons 41 (cdr (assoc 41 fao_pro))) (cons 7 (cdr (assoc 7 fao_pro))) ) ) (entmake newness)(entdel fao) (setq [color=blue]nmbr[/color] (1+ nmbr)) ) ) Works great and to be such more amazing routine you could match the Layer name to be as well as the att. were lay on. Thank you. Appreciated and liked the idea so much. Quote Link to comment Share on other sites More sharing options...
pBe Posted January 4, 2011 Share Posted January 4, 2011 (cons 8 (cdr (assoc 8 fao_pro))) Add this .. Mind you Michaels.. it will inherit the Layer properties... but if the color /linetype is by Entity.... well, thats another thing to worry about Quote Link to comment Share on other sites More sharing options...
Michaels Posted January 4, 2011 Author Share Posted January 4, 2011 (cons 8 (cdr (assoc 8 fao_pro))) Add this .. Definitely. And sometimes color of it being different , so we could add as well . (cons 62 (cdr (assoc 62 fao_pro))) Appreciated Quote Link to comment Share on other sites More sharing options...
pBe Posted January 4, 2011 Share Posted January 4, 2011 u-uh.... No my friend DXF 62 is not always present as well as DXF for linetype (6) We can re-write the whole thing if you like what you can do is test for existence of DXF 62 and 6, if found then add / if not dont add but re-writing the code using VLisp is easier i guess.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.