Results 1 to 4 of 4

Thread: Is it possible to make a Multiline Style with LISP?

  1. #1
    Member
    Join Date
    2006-05
    Posts
    11
    Login to Give a bone
    0

    Default Is it possible to make a Multiline Style with LISP?

    Dear Readers,

    Is it possible to make with lisp an Multiline styl?

    Code:
    (defun c:test ()
      (vl-load-com)
      (or adoc
    	  (setq adoc
    		 (vla-get-activedocument
    		   (vlax-get-acad-object)
    		 )
    	  )
      )
      (setq	tbldict
    	 (vla-item
    	   (vla-get-dictionaries
    		 (vla-get-database adoc)
    	   )
    	   "Acad_MlineStyle"
    	 )
      )
    )
    Can I use some thing like (vlax-invoke tbldict 'Addobject ? ?) or some thing like
    (dictadd ename symbol newobj)?

    Thank you for reading this, J. Aaij.

    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]
    Last edited by Mike.Perry; 2006-05-12 at 08:41 AM. Reason: [CODE] tags added.

  2. #2
    100 Club CADmium's Avatar
    Join Date
    2004-08
    Location
    Eberswalde, Germany, Europe
    Posts
    128
    Login to Give a bone
    0

    Default Re: Is it possible to make a Multiline Style with LISP?

    for example look here

  3. #3
    Member
    Join Date
    2006-05
    Posts
    11
    Login to Give a bone
    0

    Default Re: Is it possible to make a Multiline Style with LISP?

    Dear Thomas,

    Thanks for your solution.

    J. aaij

    PS
    With VisualLisp I get with:

    Code:
    (defun c:test ()
      (vl-load-com)
      (or adoc
    	  (setq adoc
    		 (vla-get-activedocument
    		   (vlax-get-acad-object)
    		 )
    	  )
      )
      (setq	tbldict
    	 (vla-item
    	   (vla-get-dictionaries
    		 (vla-get-database adoc)
    	   )
    	   "Acad_MlineStyle"
    	 )
      )
      (vlax-invoke tbldict 'Addobject "Newstyle" "AcDbMlineStyle")
    )
    Error: AutoCAD.Application: AcRxClassName entry is not in the system registry

    [ Moderator Action = ON ] What are [ CODE ] tags... [ Moderator Action = OFF ]
    Last edited by Mike.Perry; 2006-05-15 at 12:35 PM. Reason: [CODE] tags added.

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Is it possible to make a Multiline Style with LISP?

    Sorry I am misunderstood to you, I think you
    can use something like this, as Thomas said, change by suit

    Code:
    (defun C:demo ()
    ;;;(setvar "CLAYER" "ANNO-ARCH-WALL")  
    (setq MLINE_STYLE_NAME "WALLS"
          INNER_GAP 0.92
          OUTER_GAP 1.04)
    (if
      (not
        (dictadd
    (cdar (dictsearch (namedobjdict) "ACAD_MLINESTYLE"))
    MLINE_STYLE_NAME
    (entmakex
    (list '(0 . "MLINESTYLE")
    '(100 . "AcDbMlineStyle")
          
    (cons 2 MLINE_STYLE_NAME)
    '(70 . 0)
    '(3 . "")
    '(62 . 256)
    '(51 . 1.5708)
    '(52 . 1.5708)
    '(71 . 4)
    (cons 49  OUTER_GAP)
    '(62 . 256)
    '(6 . "BYLAYER")
    (cons 49  INNER_GAP)
    '(62 . 1)
    '(6 . "BYLAYER")
    (cons 49  (* -1 INNER_GAP))
    '(62 . 1)
    '(6 . "BYLAYER")
    (cons 49  (* -1 OUTER_GAP))
    '(62 . 256)
    '(6 . "BYLAYER")))))  
      (alert "Impossible to create mline style\n perhaps this was exist earlier"))
      (princ)
      )
      (C:demo)
    ~'J'~
    Last edited by fixo; 2006-05-15 at 05:44 PM.

Similar Threads

  1. Change multiline style of multiline object
    By Wish List System in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2011-12-14, 10:09 AM
  2. Make Style Manager a dockable palette
    By pauljordan in forum AMEP Wish List
    Replies: 0
    Last Post: 2010-07-12, 05:14 PM
  3. Specify Object Properties in MultiLine Style
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2006-11-09, 02:14 PM
  4. Multiline Path LISP
    By shadygrafix in forum AutoLISP
    Replies: 4
    Last Post: 2006-05-09, 09:49 PM
  5. Reloading Complex Linetype in Multiline Style
    By sthedens in forum AutoCAD General
    Replies: 9
    Last Post: 2006-03-07, 02:39 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
  •