Jump to content

Explode attribute Text


Michaels

Recommended Posts

  • 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

but re-writing the code using VLisp is easier i guess..

 

I don't think Visual LISP is the way to go in this case. Visual LISP properties must be accessed individually, whereas DXF data has all the information you need, and in a list - which LISP is built to deal with.

 

Lee

Link to comment
Share on other sites

I think it would be better to retain ALL properties of the original object - also, what about MText AttDefs?

 

Here's one from my library written a while back :ouch:

 

Lee

 

wayyyy better.... :)

 

I would have written the same way if given the time.... :whistle:

:lol: Good one Lee, as always

Link to comment
Share on other sites

wayyyy better.... :)

 

I would have written the same way if given the time.... :whistle:

:lol: Good one Lee, as always

 

Yours wasn't bad my friend - I think you had the right approach, just instead of pulling data from the original item, I would have removed what I didn't need (as my code demonstrates) - that way, there's less chance of missing something.

 

Also, a little tip:

 

(cons 40 (cdr (assoc 40 fao_pro)))

Could be replaced with:

 

(assoc 40 fao_pro)

:wink:

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

 

That's right .

 

I mentioned that because my Att were not on its color By Layer .

 

I am sorry for that mistake .

Link to comment
Share on other sites

Also, a little tip:

 

(cons 40 (cdr (assoc 40 fao_pro)))

Could be replaced with:

 

(assoc 40 fao_pro)

:wink:

 

Lee, you're right since i wont be assigning to a variable anyway, Good point Lee

 

Thanks my friend :)

Link to comment
Share on other sites

since i wont be assigning to a variable anyway

 

Not sure what you mean, but I meant because you have:

 

(assoc 40 <elist>)

==>  [color=red](40 . <height>)[/color]

--------------------------------------------------

(cdr (assoc 40 <elist>))

==>  <height>

--------------------------------------------------

(cons 40 (cdr (assoc 40 <elist>)))

==>  [color=red](40 . <height>)[/color]

Link to comment
Share on other sites

Definitely.:)

 

And sometimes color of it being different , so we could add as well .

(cons 62 (cdr (assoc 62 fao_pro)))

 

Appreciated

 

You know what, we never have that porblem, you see the company i work for has a strict standard compliance.. do everything BYLAYER. I sugest you do the same

just a suggestion Michaels :)

Link to comment
Share on other sites

Not sure what you mean, but I meant because you have:

 

(assoc 40 <elist>)

==> [color=red](40 . <height>)[/color]


--------------------------------------------------

(cdr (assoc 40 <elist>))

==> <height>

--------------------------------------------------

(cons 40 (cdr (assoc 40 <elist>)))

==> [color=red](40 . <height>)[/color]

 

Yup... I understand Lee, instead of breaking it apart and use cons to constuct it again, might as well use the whole thing.

my reason for saying that is if i will be using the info for something else other than entmake function, i would've assign it to a variable.

your suggestion is always welcome (that's how i learn)

 

Thanks :)

Link to comment
Share on other sites

(assoc 40 fao_pro)

Not too sure if it's a good thing ... I tend to get itchy whenever I work with any form of text using DXF code lists. And as soon as there's anything to do with the text height that itch just becomes irritating. This is mainly due to annotative text becoming screwed up when you modify (or just reuse) the text height when using entmod / entmake. But for this case it's probably not an issue because extremely seldom would the Attrib entity have been annotative itself. The block might have been, but I'd say the Attr would be very strange indeed if so.

 

But still that itch is bothering me ... what if the current and / or attrib's text style is set to be annotative? Would an entmake still screw it up? Or would the new text entity simply have anno turned off?

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