Jump to content

Changing Width Factor of Text


Kenter

Recommended Posts

Hey,

I have an updated version of a code LeeMac gave me. I am wondering how I would change a property of the Text itself tho. I want to change the 'width factor' to 0.8 and am unsure how to do it. Would I set a new cons in the LM:Text to set the width factor...? Any help is appreciated.

 

Kenter

Lee TEF.LSP

Link to comment
Share on other sites

I would have to agree with you. I find dxf codes to be confusing as well. How I figured them out is mostly by experimenting with changing the values.

 

 
(DEFUN C:GETDATA ()
 (SETQ SS (SSGET ":s"))
 (SETQ SSN (SSNAME SS 0))
 (SETQ EN (ENTGET SSN))
 (PRINC)
 (TEXTPAGE)
 (PRINC en)
 (princ)
)

 

The above code retrieves the entity data. I retrieved the entity data and then I change the value of the width factor in the properties and then I retrieved the entity data again to see what changed. In this case association 41 had changed to the value in the width factor... so ok... dxf code 41 changes the width factor. Or one could just do thier research to find what dxf codes represent but what fun would that be! :D

 

regards,

 

hippe013

Link to comment
Share on other sites

How do you know that? It worked. Prefectly infact. I just don't understand how you knew that. Seems so random to me. lol

 

 

See here Kenter:

http://images.autodesk.com/adsk/files/acad_dxf1.pdf

Link to comment
Share on other sites

Here's a nice way to look at entity data (VLA and DXF)...

 

(defun c:Info (/ opt obj)
 ;; VLA & DXF Info of selected Primary or Nested object
 ;; Alan J. Thompson
 (initget 0 "Nested Primary")
 (setq opt (cond ((getkword "\nSpecify selection mode [Nested/Primary] <Primary>: "))
                 ("Primary")
           )
 )
 (if (setq obj (car ((if (eq opt "Primary")
                       entsel
                       nentsel
                     )
                      (strcat "\nSelect " opt " object for VLA & DXF info: ")
                    )
               )
     )
   (progn
     (textscr)
     (princ "\nVLA Info:\n\n")
     (vlax-dump-object (vlax-ename->vla-object obj) T)
     (princ "\nDXF Info:\n")
     (mapcar 'print (entget obj))
   )
 )
 (princ)
)

Link to comment
Share on other sites

Oh yeah, thanks for the newer DXF link, Lee.

 

No worries mate :)

 

FYI, I use MP's EList.lsp to view entget data, I think there is also his Info.lsp - they all do pretty much the same thing :)

Link to comment
Share on other sites

No worries mate :)

 

FYI, I use MP's EList.lsp to view entget data, I think there is also his Info.lsp - they all do pretty much the same thing :)

Yeah, a lot of those, but I wanted one that would give VLA and DXF for a primary and nested object.

Link to comment
Share on other sites

Yeah, a lot of those, but I wanted one that would give VLA and DXF for a primary and nested object.

 

Yeah, I think Info.lsp does that - but I use EList as I don't always want VLA all the time - but in any case it's more rewarding to roll your own :)

Link to comment
Share on other sites

Yeah, I think Info.lsp does that - but I use EList as I don't always want VLA all the time - but in any case it's more rewarding to roll your own :)
Nah, his was Info an NInfo. I wanted to wrap everything into one.
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...