Kenter Posted August 4, 2010 Posted August 4, 2010 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 Quote
Hippe013 Posted August 4, 2010 Posted August 4, 2010 It seems to me... Yes. Try Inserting the following into the LM:Text portion: (cons 41 0. Quote
Kenter Posted August 4, 2010 Author Posted August 4, 2010 How do you know that? It worked. Prefectly infact. I just don't understand how you knew that. Seems so random to me. lol Quote
Hippe013 Posted August 4, 2010 Posted August 4, 2010 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! regards, hippe013 Quote
Kenter Posted August 4, 2010 Author Posted August 4, 2010 That is sweet. I will deffinetly write that code down. Thank you so much. Kenter Quote
Hippe013 Posted August 4, 2010 Posted August 4, 2010 No problem! Though personally I would use copy and paste... J/K hippe013 Quote
Lee Mac Posted August 4, 2010 Posted August 4, 2010 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 Quote
Hippe013 Posted August 4, 2010 Posted August 4, 2010 Nice! This will certainly come in handy! Thanks! Quote
Kenter Posted August 4, 2010 Author Posted August 4, 2010 Thank you very much Lee. That will deffinetly come in handy. Quote
Lee Mac Posted August 4, 2010 Posted August 4, 2010 There's a lot in there with all the additions to 2010, so I sometimes just stick to this: http://autodesk.com/techpubs/autocad/acad2000/dxf/ At the stage you are at, the Entity Section should get you along quite a way, but if you need any guidance, just ask. Quote
alanjt Posted August 4, 2010 Posted August 4, 2010 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) ) Quote
alanjt Posted August 4, 2010 Posted August 4, 2010 Oh yeah, thanks for the newer DXF link, Lee. Quote
Lee Mac Posted August 4, 2010 Posted August 4, 2010 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 Quote
alanjt Posted August 4, 2010 Posted August 4, 2010 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. Quote
Lee Mac Posted August 4, 2010 Posted August 4, 2010 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 Quote
alanjt Posted August 4, 2010 Posted August 4, 2010 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. Quote
Lee Mac Posted August 4, 2010 Posted August 4, 2010 Nah, his was Info an NInfo. I wanted to wrap everything into one. Oh right - nice one. Quote
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.