JackStone Posted August 31, 2011 Posted August 31, 2011 Hello everyone, this is my first post here (though I have been reading these Forums for quite a while). When you create a new multiline style (or modify an existing one) you can set a "Description" text. That text can be seen when you do the following: "MLINE" "STyle" "?" What I wish to do is retrieve that information through LISP. I couldn't find it when applyling entget-car-entsel or vlax-dump-object to the multiline entity. I don't know if this is relevant, but I shall explain why I need that description. We use multilines here to draw structural elements. The name of the MLSTYLE is the name of the steel profile, for example W150X29.5. The second number (29.5) is the linear mass of the piece (kg/m). What I need to do is multiply the MLINE length and the linear mass to obtain the final mass of the element. The problem is that I can't create a multiline style named "W150X29.5" because of the . character, which is forbidden. So I thought I'd place the linear weight information on the MLSTYLE description to later retrieve it give it proper use. Even if you gentlemen can find me a solution that does not involve retrieving MLSTYLE Description I'd still wish to find out how to do that. Thank you all for your time. Felipe Quote
Lee Mac Posted August 31, 2011 Posted August 31, 2011 The MLine Style entity is stored in the Named Object Dictionary, and the Description is DXF Group 3, e.g.: (defun _GetMLineStyleDescription ( style / dict ) (if (and (setq dict (dictsearch (namedobjdict) "ACAD_MLINESTYLE")) (setq dict (dictsearch (cdr (assoc -1 dict)) style)) ) (cdr (assoc 3 dict)) ) ) Call with your style name: (_GetMLineStyleDescription "YourStyleName") Lee Quote
JackStone Posted August 31, 2011 Author Posted August 31, 2011 Well, that solves my problem. The thing was I couldn't find where the MLSTYLE entity was stored. Thank you very much! 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.