Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by Christina on April 14, 2021, 01:08:17 PM »
Thank you for thinking about it !

Christina
22
AutoLISP (Vanilla / Visual) / Re: AutoLISP with Microstation
« Last post by John Kaul (Se7en) on April 14, 2021, 12:55:07 PM »
Oh, of course.
Quote
Maybe the answer could be BricsCAD, BLADE and OpenDCL.

I want mean that BricsCAD, BLADE and OpenDCL
could be a solution for Visual(?)Lispers
because Blade and the Lisp of BricsCAD and OpenDCL
are slowly growing . . .

And they haven't stopped for many years like Acad's Lisp.

This has nothing to do with MicroStation, of course.
23
AutoLISP (Vanilla / Visual) / Re: AutoLISP with Microstation
« Last post by domenicomaria on April 14, 2021, 12:09:20 PM »
Quote
Maybe the answer could be BricsCAD, BLADE and OpenDCL.

I want mean that BricsCAD, BLADE and OpenDCL
could be a solution for Visual(?)Lispers
because Blade and the Lisp of BricsCAD and OpenDCL
are slowly growing . . .

And they haven't stopped for many years like Acad's Lisp.

This has nothing to do with MicroStation, of course.

24
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by ronjonp on April 14, 2021, 12:01:13 PM »
RonJon,
Don't know if I can ask another question, but that's the last one!   :oops:
After pick the rectangle, Lisp asks how many divisions I want on the longest side.
If I type 3 the code divides the rectangle into 3 parts and draws diagonal lines in the 3 parts...

Thanks again for your previous code(very happy)!
Christina
Post a picture of what you're trying to explain.
25
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by Christina on April 14, 2021, 11:47:48 AM »
RonJon,
Don't know if I can ask another question, but that's the last one!   :oops:
After pick the rectangle, Lisp asks how many divisions I want on the longest side.
If I type 3 the code divides the rectangle into 3 parts and draws diagonal lines in the 3 parts...

Thanks again for your previous code(very happy)!
Christina
26
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by ronjonp on April 14, 2021, 10:57:41 AM »
OMG - Thank you very much ronjonp!  :smitten:
My day can not be ruined

Christina
Glad to help :)
27
AutoLISP (Vanilla / Visual) / Re: Problem with entmod - Bug in AutoCAD?
« Last post by Marc'Antonio Alessi on April 14, 2021, 10:57:05 AM »
:)  It was an old question... http://www.theswamp.org/index.php?topic=41456.msg465573#msg465573
IMHO I think this is not a Bug  8)

It was my post! I had completely forgotten it.
It came up again on a referral from a client of mine.

In my opinion this is a bug, my code works with all object types except ARC_DIMENSION, I see no reason to think this is normal.
Also the problem only occurs in AutoCAD, while BricsCAD has no problem here.
Also, again in my opinion, a system crash is always a bug as it is something unexpected.
The difference is that BricsCAD NEVER removes "ACAD" Xdata ...        and I don't know (and I've never tried)  if it allows their modification...
28
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by Christina on April 14, 2021, 10:42:46 AM »
OMG - Thank you very much ronjonp!  :smitten:
My day can not be ruined

Christina
29
Greetings.

First, let me provide some context to my problem. The goal is to create a reference Polyline - bocPolyline from the existing closed boundary - lotLine, if the roadLine is close to && parallel to the lotLine . I have an ObjectIdCollection - roadLines and a Point3dCollection foundIntPoints. I have been searching for a way to simply get the distance between the roadLines and foundIntPoints. This was not a hard task previously when the roadLines were Polylines, but I am not sure how to approach this problem now.

 

The previous way I got distance from the polyline to the Point Collection:
Code: [Select]
protected Polyline createBOCReferencePolyline(Polyline roadLines, Polyline lotline, Point3dCollection foundIntPoints)
        {
            Polyline bocPolyline = new Polyline();
            var plane = new Plane(Point3d.Origin, Vector3d.ZAxis);
           
            for (int i = 0; i < foundIntPoints.Count; i++)
            {
                if (roadLines.(foundIntPoints[i]) < 20)
                {
                    if (roadLines.Angle == lotline.Angle)
                    {
                        bocPolyline.AddVertexAt(i, foundIntPoints[i].Convert2d(plane), 0.0, 0.0, 0.0);
                    }
                }
            }

            return bocPolyline;
        }

Btw - I know that the .Angle call is not a real thing, I included it for the sake of simplicity.
I would greatly appreciate anyone's help on this. If a part of my question needs more context, please let me know thank you.
30
AutoLISP (Vanilla / Visual) / Re: Draw diagonal hatch lines in rectangle by pick
« Last post by ronjonp on April 14, 2021, 10:31:17 AM »
Welcome to TheSwamp! Here's an example with some comments:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ _boundary e p)
  2.   ;; RJP 2021-04-14
  3.   ;; Function to get a boundary from a point (bpoly) locks up my session for some reason
  4.   (defun _boundary (p / e)
  5.     (setq e (entlast))
  6.     (command "_.-boundary" p "")
  7.     (if (not (equal e (entlast)))
  8.       (entlast)
  9.     )
  10.   )
  11.   ;; If we have a point and a boundary is created
  12.   (cond ((and (setq p (getpoint "\nPick an internal point: ")) (setq e (_boundary p)))
  13.          (if (= "SOLID" (cdr (assoc 0 (entget e))))
  14.            (alert "Change boundary type to polyline then run the code again...")
  15.            (progn ;; Get the polyline coordinates
  16.                   (setq p (mapcar 'cdr (vl-remove-if '(lambda (x) (/= 10 (car x))) (entget e))))
  17.                   ;; Remove our temp boundary
  18.                   (entdel e)
  19.                   ;; Create a line using the first and third point
  20.                   (entmakex (list '(0 . "line") (cons 10 (car p)) (cons 11 (caddr p))))
  21.                   ;; Create a line using the second and fourth point
  22.                   (entmakex (list '(0 . "line") (cons 10 (cadr p)) (cons 11 (cadddr p))))
  23.            )
  24.          )
  25.         )
  26.   )
  27.   (princ)
  28. )
Pages: 1 2 [3] 4 5 ... 10