Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / Re: Weld Symbols
« Last post by Kerry on August 29, 2014, 11:06:35 pm »
As CAB has indicated,

http://www.theswamp.org/index.php?topic=6909.msg109181#msg109181

rename Tip1735b.dcl to WELD.DCL

also,
rename Tip1735c.txt to WELD.SLB
2
AutoLISP (Vanilla / Visual) / Re: Weld Symbols
« Last post by emk2012 on August 29, 2014, 10:53:21 pm »
where is the WELDS.SLB ?
3
AutoLISP (Vanilla / Visual) / Re: Weld Symbols
« Last post by Theo on August 29, 2014, 08:24:14 pm »
Mr. Cab,
I cannot get access to a slide and icon library. Please provide me with those files, so I can try to run the AWELD.LSP

Thank you,
Theodorus Winata
twinata@shaw.ca
4
AutoLISP (Vanilla / Visual) / Re: =={ Challenge }== Decompress String
« Last post by VovKa on August 29, 2014, 04:06:00 pm »
recursive
one defun
one argument
not suitable for benchmarking
Code: [Select]
(defun decompress (l / a b c)
  (if (setq b (vl-member-if
(function (lambda (x) (setq a (cons x a)) (< 47 x 58)))
(vl-string->list l)
      )
      )
    (decompress
      (vl-list->string
(append (reverse (repeat (- (car b) 48) (setq c (append c (cdr a))))) (cdr b))
      )
    )
    l
  )
)
5
AutoLISP (Vanilla / Visual) / Re: vla-explode changes drawing ?!?
« Last post by matthias312 on August 29, 2014, 03:50:45 pm »
In my experience, exploding blocks will generally make the files larger, not smaller.
I think i explained a little bit wrong. Goal is to clean the drawing.
When i'm done i put the result together in one block.

Because some (but perhaps not all) of the various constraints would still be present, causing the objects to be contorted as they are manipulated by AutoCAD to meet the remaining constraints.
Thought something like this. Because the behaviour changes by moving or turning the block before exploding.
In a certain angle the locked point (0 0) works and the lines beginpoint jumps to (0 0)^^

As there is no Acad on my home desktop at the moment. I have to wait untill monday to test.
Have a nice weekend!
6
AutoLISP (Vanilla / Visual) / Re: =={ Challenge }== Decompress String
« Last post by Lee Mac on August 29, 2014, 03:36:18 pm »
Another, just aiming for something different:

Code - Auto/Visual Lisp: [Select]
  1. (defun LM:decompress3 ( s / c p r x )
  2.    (setq r "")
  3.    (if (setq p (vl-string-position 48 s))
  4.        (setq s (substr s (+ 2 p)))
  5.    )
  6.    (repeat (strlen s)
  7.        (if (< 47 (setq c (ascii s)) 58)
  8.            (progn(setq x r) (repeat (- c 49) (setq r (strcat r x))))
  9.            (setq r (strcat r (chr c)))
  10.        )
  11.        (setq s (substr s 2))
  12.    )
  13.    r
  14. )
7
AutoLISP (Vanilla / Visual) / Re: vla-explode changes drawing ?!?
« Last post by ronjonp on August 29, 2014, 03:03:45 pm »
This seems to work on your drawing:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:boom (/ d doc)
  2.  (and (setq d (dictsearch (namedobjdict) "acad_assocnetwork")) (entdel (cdr (assoc -1 d))))
  3.  (vlax-for l (vla-get-layers doc) (and (= -1 (vlax-get l 'lock)) (vlax-put l 'lock 0)))
  4.    (and (= 0 (+ (vlax-get bd 'islayout) (vlax-get bd 'isxref) (vlax-get bd 'explodable)))
  5.         (vlax-put bd 'explodable -1)
  6.    )
  7.    (vlax-for b bd
  8.      (if (= (vlax-get b 'objectname) "AcDbBlockReference")
  9.        (progn (vla-explode b) (vla-delete b))
  10.      )
  11.    )
  12.  )
  13.  (vla-purgeall doc)
  14.  (princ)
  15. )
8
AutoLISP (Vanilla / Visual) / Re: vla-explode changes drawing ?!?
« Last post by ronjonp on August 29, 2014, 03:02:48 pm »
Quote
Off topic, but why are you exploding the block ?

I have to write a program to clean up dwg-files making them as small as possible.
My program allready works, but the part exploding blocks in drawing works only with (command-s "_.explode" ....).
As there are really big dwgs with many blocks this sometimes takes a while.

Quote
Here is some code to convert the block to static
Allready tried something like this. As long as the constraints stay in the block the problem stays.
When i manually delete the constraints in the Blockeditor and then use the vla-explode it works fine.

Someone knows a way how to delete theese out of the block before/while exploding?
In my experience, exploding blocks will generally make the files larger, not smaller.


http://www.theswamp.org/index.php?topic=47734.msg527428#msg527428
 :)
9
AutoLISP (Vanilla / Visual) / Re: vla-explode changes drawing ?!?
« Last post by cmwade77 on August 29, 2014, 02:51:16 pm »
Quote
Off topic, but why are you exploding the block ?

I have to write a program to clean up dwg-files making them as small as possible.
My program allready works, but the part exploding blocks in drawing works only with (command-s "_.explode" ....).
As there are really big dwgs with many blocks this sometimes takes a while.

Quote
Here is some code to convert the block to static
Allready tried something like this. As long as the constraints stay in the block the problem stays.
When i manually delete the constraints in the Blockeditor and then use the vla-explode it works fine.

Someone knows a way how to delete theese out of the block before/while exploding?
In my experience, exploding blocks will generally make the files larger, not smaller.
10
AutoLISP (Vanilla / Visual) / Re: Force Arial Font to Display during grread
« Last post by caddcop on August 29, 2014, 01:05:29 pm »
How would you make the font smaller in the hover tip?
This works pretty nice even with Civil 3D objects.
Pages: [1] 2 3 ... 10