Results 1 to 10 of 10

Thread: Plugin from AutoLisp ? / vl*- help ? / merge cells?

  1. #1
    Login to Give a bone
    0

    Default Plugin from AutoLisp ? / vl*- help ? / merge cells?

    I am new in programing. I solve many problems reading to internet. Same is still unsolved.

    1. How can i build a plugin from AutoLisp?

    2. I found same vl- ,vla , vlax etc functions in acad help. Where i find a complete help.

    3. How can I merge a cell in a table (Lisp).

    4. What means the two char in a (defun XX:lalalal...

    Thank you!

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

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Welcome on board,
    Perhaps you need to start from this thread:
    http://forums.augi.com/showthread.ph...-Learning-Lisp
    Personally I've started to learning lisp with help of this awesome site:
    http://www.afralisp.net

    I have a code to merge cells, but I need to search for it
    in my code garbage, if I will find them then I'll upload code later

    Happy learning

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

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Try this code to merge cells
    Code:
    (defun c:merg (/ colmax colmin en getcell maxcell mincell osm pmax pmin rowmax rowmin tblobj)
      
      (vl-load-com)
    ;; local defun
    ;; based on code written by Lee Ambrosius
    ;; date: 3/24/04
    ;; edited 11/21/10
    (defun getcell(tblobj pt / col lwrleft pick row uprright vector vheight  vwidth)
     
     (setq vheight (getvar "viewsize"))
     (setq vwidth (* (/ (nth 0 (getvar "screensize")) (nth 1 (getvar "screensize"))) vheight))
    
     (setq lwrleft (list (- (nth 0 (getvar "viewctr")) (/ vwidth 2)) (- (nth 1 (getvar "viewctr")) (/ vheight 2)) 0))
     (setq uprright (list (+ (nth 0 (getvar "viewctr")) (/ vwidth 2)) (+ (nth 1 (getvar "viewctr")) (/ vheight 2)) 0))
    
     (setq vector (vlax-make-safearray vlax-vbdouble '(0 . 2)))
     (vlax-safearray-fill vector '(1 1 1))
     (setq vector (vlax-make-variant vector))
    
     (setq pick (vlax-3d-point pt))
    
     (if pick 
       (if (= (vla-hittest tblobj pick vector 'row 'col) :vlax-true)
               (list row col)))
      (list row col)
      )
      
    ;; 				main part				;;
    
      (setq en (entsel "\n\t  >>  Select Table >>"))
      
     (setq	tblobj (vlax-ename->vla-object (car en)))
    
      (setq osm (getvar 'osmode))
      (setvar 'osmode 0)
     ;;; (setq pmin (getpoint "\n\t  >>  Óêàçàòü ëåâóþ ( èëè ëåâóþ âåðõíþþ ) ÿ÷åéêó äèàïàçîíà òàáëèöû >>" )
    ;;;	pmax (getcorner pmin "\n\t  >>  Óêàçàòü ïðàâóþ ( èëè ïðàâóþ íèæíþþ ) ÿ÷åéêó äèàïàçîíà òàáëèöû >>" ))
    (setq pmin (getpoint "\n\t >> Specify the left (or top left) cell of the table range >>")
          pmax (getcorner pmin "\n\t >> Specify the right (or bottom right) cell of the table range >>"))
      (setq mincell(getcell tblobj pmin))
      (setq maxcell(getcell tblobj pmax))
      (setq rowmin (car mincell)colmin (cadr mincell)
    	rowmax (car maxcell)colmax (cadr maxcell)
    	)
      
     (vla-setsubselection tblobj rowmin rowmax colmin colmax)
    
    (vla-getsubselection tblobj 'rowmin 'rowmax 'colmin 'colmax)
    
    (vla-mergecells tblobj rowmin rowmax colmin colmax)
      
    (vla-clearsubselection tblobj)
    
     (setvar 'osmode osm)
      (princ)
      )
    (prompt "\n\t\t---\tStart command with  MERG \t---")
    (prin1)
    (or (vl-load-com)(princ))

  4. #4
    Login to Give a bone
    0

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Thank you!
    and for the code too!

    I have another problem:

    I understand that :
    (vla-"method" arg1...)
    where method is in dump list
    ex:
    Code:
    ...
    ;     MergeCell (4)
    ...
    The question is:
    How can i get the meaning of arg1...arg4
    Is it a methot like vlax-dump-object?
    Where you find that the arg is the row and colmn of the starting and ending cell?

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

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Code:
    (vla-mergecells tblobj rowmin rowmax colmin colmax)
    tblobj - acad table object this method applied to
    Arguments are (4):

    rowmin - minmal row index
    rowmax - maximal row index
    colmin - minmal column index
    colmax - maximal column index

    Will this make a sence?

  6. #6
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Arguments for methods are defined in the ActiveX/COM help, same place as for writing with VBA. The only difference in most cases is the calling method.

  7. #7
    Login to Give a bone
    0

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    I try to search a link or a PDF or something. Nothing found!
    I found everything on www but not activex methods and arguments.

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

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Try to buy this book
    https://sites.google.com/site/visuallispbible/
    or find old PDF copy on Google

  9. #9
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    Try under the various local install folders for acadauto.chm (found mine under Program Files\Common Files\AutoDesk Shared\). I can't bring myself to trust the results of Windows search, so a little manual digging may be required.

  10. #10
    Login to Give a bone
    0

    Default Re: Plugin from AutoLisp ? / vl*- help ? / merge cells?

    That's good! Thank you!
    What's about " How can i build a plugin from AutoLisp?"

Similar Threads

  1. Need PDFs w/ Merge Control, Lines Merge vs. Overwrite
    By wbs69117950 in forum AutoCAD General
    Replies: 17
    Last Post: 2012-09-22, 07:38 AM
  2. Merge Cells in Parts List
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 2
    Last Post: 2012-07-31, 03:58 AM
  3. ADN Plugin ....
    By cnevians@yahoo.fr in forum Revit Architecture - General
    Replies: 0
    Last Post: 2011-07-21, 12:24 PM
  4. Need PDFs w/ Merge Control, Lines Merge vs. Overwrite
    By wbs69117950 in forum AutoCAD Plotting
    Replies: 2
    Last Post: 2009-08-25, 09:59 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
  •