Recent Posts

Pages: 1 ... 8 9 [10]
91
I have used this code many dozen times. . .

And everything worked fine. . .

Perhaps the print driver is damaged. . .

I use "AutoCAD PDF (High Quality Print).pc3"
92
AutoLISP (Vanilla / Visual) / Re: assign the plot output PDF file name, via VLISP
« Last post by Lee Mac on April 07, 2021, 03:49:52 PM »
It looks as though you're setting the Plot Type to Window before defining a window to plot...
93
AutoLISP (Vanilla / Visual) / Re: AutoLISP with Microstation
« Last post by Lee Mac on April 07, 2021, 03:42:50 PM »
To John is this backwards ?

"C is a low level language so if you know C you can usually use/learn a higher level language like Lisp, VB(A), etc fairly easily."

Like lisp 4 lines of code C is like 10 lines of code.

Backwards in what sense?

Languages such as LISP/VBA are considered high level because many operations are abstracted away and instead performed by the interpreter/compiler; consequently, programs may be written far more succinctly using relatively readable 'natural' language rather than machine code, generally at the sacrifice of power and performance; whereas low level languages (such as Assembly) are 'closer to the metal', and consequently written in language more readable to a machine than a human, with far fewer operations abstracted, consequently requiring significantly more code to perform the same operation as a high-level language (in which the equivalent machine code is implemented through the design of the language itself, rather than the programmer).
94
AutoLISP (Vanilla / Visual) / Re: assign the plot output PDF file name, via VLISP
« Last post by VovKa on April 07, 2021, 03:38:55 PM »
Normally the VovKa code
works perfectly !
. . .
But today . . .
. . .
What happens ?
you've made some changes to my code

try my original version
95
Normally the VovKa code
works perfectly !
. . .
But today . . .
. . .
What happens ?
96
Land Lubber / Geographically Positioned / Parcel to Catchment
« Last post by MSTG007 on April 07, 2021, 11:33:21 AM »
Another off the wall question. Any idea if you can push parcel data into a catchment?

I have some user fields within a parcel for Structure ID, Coef, and TC.

What I have been doing is exploding the parcel to get a close polyline, then converting that over to a catchment.

I know i could possibly extract the parcels to excel and then do the same for the pipe networks.

Like i said, just brain storming some ideas here.
97
Have you tried giving the layer the points are on a color of 255,255,255? Then you could have 3 point styles to control the color of the tree symbol.

Not positive it would work, just thinking out loud.
98
Wow it's the best
I really needed this routine
Thank you so much for making it so fast
Thank you, thank you and thank you very much.
99
Land Lubber / Geographically Positioned / Re: COGO point label masking weirdness
« Last post by CHulse on April 07, 2021, 08:47:53 AM »
Thanks for that. Unfortunately, my tree symbology relies on layer transparency to display correctly, so I can't turn that off. Lately, my work around has been to create a duplicate set of points to drive the labeling separate from the symbology. Far from ideal, but at least it works.
100
Try this

Code - Auto/Visual Lisp: [Select]
  1. ;Join parallel lines
  2. ;Stefan M - 07.04.2021
  3. (defun c:ljoin ( / *error* acDoc ss d i en el p1 p2 a y p l p3 p4)
  4.  
  5.   (if (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark acDoc))
  6.  
  7.  
  8.   (defun *error* (msg)
  9.     (and
  10.       msg
  11.       (not (wcmatch (strcase msg) "*CANCEL*,*QUIT*,*EXIT*"))
  12.       (princ (strcat "\nError: " msg))
  13.     )
  14.     (if (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark acDoc))
  15.     (princ)
  16.   )
  17.   (if
  18.     (and
  19.       (or
  20.         (setq ss (ssget "_I" '((0 . "LINE"))))
  21.         (setq ss (ssget '((0 . "LINE"))))
  22.       )
  23.       (progn
  24.         (initget 6)
  25.         (setq d (getdist "\nSpecify maximum gap: "))
  26.       )
  27.     )
  28.     (progn
  29.       (sssetfirst nil nil)
  30.       (setq d (+ d 1e-8))
  31.       (repeat (setq i (sslength ss))
  32.         (setq en (ssname ss (setq i (1- i)))
  33.               el (entget en)
  34.               p1 (cdr (assoc 10 el))
  35.               p2 (cdr (assoc 11 el))
  36.               a  (angle p1 p2)
  37.               a  (atan (/ (sin a) (cos a)))
  38.               a  (if (equal a (/ pi -2) 1e-5) (/ pi 2) a)
  39.               y  (apply '- (mapcar '* (list (sin a) (cos a)) p1))
  40.         )
  41.         (if
  42.           (setq p (vl-some
  43.                    '(lambda (x)
  44.                       (if
  45.                         (and
  46.                           (equal (car x) a 1e-3)
  47.                           (equal (cadr x) y d)
  48.                         )
  49.                         x
  50.                       )
  51.                     )
  52.                     l
  53.                  )
  54.           )
  55.           (progn
  56.             (setq l (vl-remove p l)
  57.                   p3 (caddr p)
  58.                   p4 (cadddr p)
  59.             )
  60.             (if
  61.               (< (distance p1 p3) (distance p1 p4))
  62.               (mapcar 'set '(p3 p4) (list p4 p3))
  63.             )
  64.             (entmakex
  65.               (list
  66.                 '(0 . "LWPOLYLINE")
  67.                 '(100 . "AcDbEntity")
  68.                 '(100 . "AcDbPolyline")
  69.                 '(90 . 4)
  70.                 '(70 . 1)
  71.                 (cons 10 p1)
  72.                 (cons 10 p2)
  73.                 (cons 10 p3)
  74.                 (cons 10 p4)
  75.               )
  76.             )
  77.           )
  78.           (setq l (cons (list a y p1 p2 en) l))
  79.         )
  80.       )
  81.       (if l
  82.         (progn
  83.           (setq ss (ssadd))
  84.           (foreach x l (ssadd (nth 4 x) ss))
  85.           (sssetfirst nil ss)
  86.           (princ "\nSelected lines not joined.")
  87.         )
  88.       )
  89.     )
  90.   )
  91.   (*error* nil)
  92.   (princ)
  93. )
  94.  
Pages: 1 ... 8 9 [10]