Jump to content

Explode attribute Text


Michaels

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • Michaels

    10

  • pBe

    9

  • Lee Mac

    5

  • eldon

    4

Popular Days

Top Posters In This Topic

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.:)

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by pBe
Missing variable
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.... :shock:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 
(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 :)

Link to comment
Share on other sites

 
(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

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...