All Activity
- Today
-
Please help me if you know about lisp. Thank you.
CAD2005 replied to CAD2005's topic in AutoLISP, Visual LISP & DCL
Thank you very much @Nikon! Thank you. -
Please help me if you know about lisp. Thank you.
CAD2005 replied to CAD2005's topic in AutoLISP, Visual LISP & DCL
@ -
Please help me if you know about lisp. Thank you.
CAD2005 replied to CAD2005's topic in AutoLISP, Visual LISP & DCL
- Yesterday
-
bustr started following Verify attribute values?
-
Does anyone know how to turn off the setting that prompts to "Verify attribute values"? I am trying to run a script.
-
Select both polylines find the polyline that has the most vertex Then process those vertex with vlax-curve-getClosestPointTo store the mid point of vertex and closest point in a list entmake new polyline with list points. Seems to work well tho will need to test if you have open or closed polylines. defaults to closed tho i don't think its quite the mid / avg path ;;----------------------------------------------------------------------------;; ;; CLOSE POLY AVERAGE, Finds the mid point avg between close polylines donut shape (defun c:CLOSEPOLYAVG (/ sel1 sel2 ent1 ent2 cnt1 cnt2 main other i ptv ptc mid pts) (defun c:CPA () (C:CLOSEPOLYAVG)) (defun midpt (p1 p2) (mapcar '(lambda (a b) (/ (+ a b) 2.0)) p1 p2) ) (setq sel1 (entsel "\nSelect First close Polyline: ")) (setq sel2 (entsel "\nSelect Second closed Polyline: ")) (if (and sel1 sel2) (progn (setq ent1 (vlax-ename->vla-object (car sel1)) ent2 (vlax-ename->vla-object (car sel2)) cnt1 (fix (vlax-curve-getEndParam ent1)) cnt2 (fix (vlax-curve-getEndParam ent2)) ) (if (> cnt1 cnt2) (setq main ent1 other ent2) (setq main ent2 other ent1) ) (setq pts '()) (setq i 0) (while (<= i (fix (vlax-curve-getEndParam main))) (setq ptv (vlax-curve-getPointAtParam main i)) (setq ptc (vlax-curve-getClosestPointTo other ptv)) (setq mid (midpt ptv ptc)) (setq pts (append pts (list mid))) (setq i (1+ i)) ) (entmake (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length pts)) '(70 . 1) ;; closed ) (mapcar '(lambda (p) (cons 10 p)) pts) ) ) (princ "\nNew midpoint polyline created.") ) (princ "\nSelection error.") ) (princ) )
-
@pkenewell Thank you very much. I finally got it working. In my case, I set the "length of arcs" to 1. And it worked. But I think the resulting axis isn't very geometrically rigorous. I've attached an example image: -The polyline created by the command is shown in green. -The correct geometry of the axis is shown in dashed red. I think there should be a more geometrically rigorous solution in some older Lisp. Is it possible? Does anyone know of one?
-
ediazg joined the community
-
Finding (and detaching) Raster Image and PDF references in AutoLISP
Jabberwocky replied to Jabberwocky's topic in AutoLISP, Visual LISP & DCL
That did exactly what I needed. Thanks so much! -
The "MC" command by roy437 works for me on your example drawing. You have to set the point resolution (prompt for "Specify Length for arc(ds)") to improve the results. I used 0.1 for pretty good results.
-
The code does not work correctly with polylines that have a large number of segments. Example1.dwg
-
I attach an example Example.dwg
-
@pkenewell Thanks for help. I downloaded the latest code from link and loaded it, but it doesn't seem to do anything. I probably don't understand how it works.
-
@NikonThanks for the code. I tried it. But it only works sometimes. And if the polylines' first point coincides with the last, it doesn't work. Is it possible that I'm doing something wrong?
-
popzz joined the community
-
I can run drafixcad v2.1 with emulator otvdm ( winevdm)16bit installed in windows 11 x64 found on github https://github.com/otya128/winevdm?tab=readme-ov-file Regards Pop
-
-
pkenewell started following Hybrid parallel
-
Look into this post for ideas:
-
Yes you can use the plain ROTATE commad uing the reference option. For example, Command: ROTATE Current positive angle in UCS: ANGDIR=counterclockwise ANGBASE=0 Select objects: 1 found Select objects: pick object then enter Specify base point: vertex 1 Specify rotation angle or [Copy/Reference] <0>: r Specify the reference angle <0>: vertex 1 again Specify second point: vertex 2 Specify the new angle or [Points] <0>: vertex 3
-
Perhaps the most appropriate description is to obtain the axis between 2 irregular polylines
-
Please help me if you know about lisp. Thank you.
Nikon replied to CAD2005's topic in AutoLISP, Visual LISP & DCL
You can also watch here: https://forums.augi.com/showthread.php?53180-Change-color-of-existing-MTEXT-Objects&highlight=remove formating -
sdffd joined the community
-
Dahzee started following Pyramid rotation
-
I'm no 3D expert, but should the OP be using the 2D Rotate if all they are doing is copying the Pyramid onto its side?
-
Copy and paste error (blocks changes!)
rlx replied to X11start's topic in AutoLISP, Visual LISP & DCL
well , downloaded your files on my homedragon and no errors on my side , maybe others can give it a go and see if they get an error? -
mhupp started following Hybrid parallel
-
Posting a drawing would help to be more clear with what your asking for. but maybe this is what your looking for. PAV
-
lrm started following Pyramid rotation
-
Sometimes I find it much easier to use the ALIGN command instead of rotate or rotate3d. In this case just use d' and o' as the source points and points on the x axis for the two target points. The distance from the d' target point to the o' target point is not critical just don't scale the result when prompted.
-
CelsoBlackfyre joined the community
-
Do you need to rotate the pyramid itself, or just the view of it? You can draw it once in model space, then create multiple viewports in paper space to get the diagram you attached. No need to rotate the original pyramid.
-
Hi again. This may also happen to others: sometimes I have two polylines and I need to get something like a common parallel to both. A sort of hybrid parallel from the original two. Is it possible that this topic has been discussed in the history of this forum and there is a LISP to solve this problem? Thanks in advance.