JPlanera Posted November 3, 2010 Share Posted November 3, 2010 I'm writing a LISP that uses DIMSCALE. My dimensions have tolerances, and info in Text Override, and none are alike. As soon as DIMSCALE is set, I lose all that info... How would I be able to recall this information from the selection set?? I cant seem to figure it out Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 3, 2010 Share Posted November 3, 2010 If using Vanilla, Text Override is DXF Code 1, else in VL it's the TextOverride Property. Tolerances are another issue, which you'll have to look up in the VLIDE Help Docs - there are many properties/dxf codes. Quote Link to comment Share on other sites More sharing options...
JPlanera Posted November 3, 2010 Author Share Posted November 3, 2010 If using Vanilla, Text Override is DXF Code 1, else in VL it's the TextOverride Property. Tolerances are another issue, which you'll have to look up in the VLIDE Help Docs - there are many properties/dxf codes. Interesting... I am investigating this now. As I am a self taught code writer, a simple example would do wonders! Thanks for the tip Lee. You have quite a reputation around these parts.... Kudos to you, my friend!! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 3, 2010 Share Posted November 3, 2010 Thanks JPlanera Here's a small example to retrieve the Text Override for a dimension entity: Vanilla: (defun c:test1 ( / ent ) (if (and (setq ent (car (entsel "\nSelect Dimension: "))) (wcmatch (cdr (assoc 0 (entget ent))) "*DIMENSION") ) (alert (strcat "Text Override:\n" (cdr (assoc 1 (entget ent))))) ) (princ) ) Visual: (defun c:test2 ( / ent ) (if (and (setq ent (car (entsel "\nSelect Dimension: "))) (wcmatch (cdr (assoc 0 (entget ent))) "*DIMENSION") ) (alert (strcat "Text Override:\n" (vla-get-TextOverride (vlax-ename->vla-object ent)))) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
JPlanera Posted November 3, 2010 Author Share Posted November 3, 2010 No, thank you! Vanilla code works fine. I assume this would be different for multiple dimensions? Can I use the same format then, to recall tolerances? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 3, 2010 Share Posted November 3, 2010 For multiple dims you might consider stepping through a SelectionSet: (defun c:test3 ( / i ss ent lst ) (if (setq i -1 ss (ssget '((0 . "*DIMENSION")))) (progn (while (setq ent (ssname ss (setq i (1+ i)))) (setq lst (cons (cdr (assoc 1 (entget ent))) lst)) ) (print (reverse lst)) ) ) (princ) ) Tolerances are another issue, I would think it is easier to deal with them using VL, but to be honest, I've not dealt with Tolerances before so I'd have to dig around with the DXF info first. Have a look at this reference here, and also the VLIDE Help Docs on the properties of a VLA Dimension Object. Lee Quote Link to comment Share on other sites More sharing options...
JPlanera Posted November 3, 2010 Author Share Posted November 3, 2010 I will look over this info. Thank you very much for the assistance! 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.