Results 1 to 4 of 4

Thread: trying to use entmake to create a mlinestyle

  1. #1
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default trying to use entmake to create a mlinestyle

    Code:
    (entmake '((0 . "MLINESTYLE") (2 . "SFD") (70 . 272) (62 . 0) 
    (62 . 4) (51 . 90.0) (52 . 90.0) (71 . 2) (49 . 5.0) (49 . -5.0) (6 . "CONTINUOUS")))
    can't seem to get it, wonder if I am close?

  2. #2
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: trying to use entmake to create a mlinestyle

    Don't want to sound negative but I haven't seen anyone that could entmake a multiline.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: trying to use entmake to create a mlinestyle

    Its probably possible, but seeing as a MLINESTYLE is supposed to be some sort of XRECORD in a DICTIONARY Object, a simple entmake would not suffice.

    You'll probably need to use entmakex. Then use dictadd to add the ename of this to the ACAD_MLINESTYLE named object dictionary. But something still seems out of place ... there's no way of adding the MLStyle name to the dictionary, which is supposed to have a list of (3 . "StyleName") (350 . <Entity name of record object>) for each of the styles.

  4. #4
    I could stop if I wanted to
    Join Date
    2007-05
    Location
    Brookfield WI
    Posts
    331
    Login to Give a bone
    0

    Default Re: trying to use entmake to create a mlinestyle

    ok thanks to both of you, will have to try another avenue then

    so after searching the autodesk discussion threads I found a routine that fixo worked out and modified it to create the mline style I need.

    fixos original thread can be found here

    Code:
    (setq MLINE_STYLE_NAME "SFD-routine"
          INNER_GAP 5.0
          OUTER_GAP 5.0)
    (if
      (not
        (dictadd
    (cdar (dictsearch (namedobjdict) "ACAD_MLINESTYLE"))
    MLINE_STYLE_NAME
    (entmakex
    (list '(0 . "MLINESTYLE")
    '(100 . "AcDbMlineStyle")
          
    (cons 2 MLINE_STYLE_NAME)
    '(70 . 272)
    '(3 . "")
    '(62 . 256)
    '(71 . 4)
    (cons 49  OUTER_GAP)
    '(62 . 4)
    '(6 . "BYLAYER")
    (cons 49  INNER_GAP)
    '(62 . 4)
    '(6 . "BYLAYER")
    (cons 49  (* -1 INNER_GAP))
    '(62 . 4)
    '(6 . "BYLAYER")
    (cons 49  (* -1 OUTER_GAP))
    '(62 . 4)
    '(6 . "BYLAYER")))))  
      (alert "Impossible to create mline style\n perhaps this was exist earlier"))
      (princ)
    Last edited by d_m_hopper; 2009-01-19 at 03:48 PM.

Similar Threads

  1. Replies: 19
    Last Post: 2010-09-14, 04:00 PM
  2. entmake
    By gagage in forum AutoLISP
    Replies: 12
    Last Post: 2010-08-12, 06:39 PM
  3. Create Mtext with entmake
    By TobyKanoby in forum AutoLISP
    Replies: 7
    Last Post: 2007-06-07, 08:19 AM
  4. Using entmake to create a block
    By t-bone67 in forum AutoLISP
    Replies: 1
    Last Post: 2005-06-06, 06:08 PM
  5. Using entmake to create (redefine) Blocks
    By melkor in forum AutoLISP
    Replies: 2
    Last Post: 2005-01-26, 11:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •