Jump to content

Retrieve Multiline Description


Recommended Posts

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.


Link to comment
Share on other sites

The MLine Style entity is stored in the Named Object Dictionary, and the Description is DXF Group 3, e.g.:


(defun _GetMLineStyleDescription ( style / dict )
           (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")


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.

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