Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/24/2023 in all areas

  1. Maybe this one of lee mac can help you.
    2 points
  2. reckon this will help https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-8543549B-F0D7-43CD-87A3-F6B827FF0B88 Probably: vl-string-subst Worth noting that the backslash often denotes the next character is a special character (a tab \t, new line, \n and so on) so to make it useable you might need a double \\ (tell the LISP you want to use the special character \)
    1 point
  3. Can you post a sample drawing, I am not quite sure what you are wanting. A second thing you could do - and that might almost write the LISP for you.. is write down all the steps you do manually. Get it working for one viewport and the change to select all of them is usually quite easy
    1 point
  4. The first step to becoming a proficient programmer is learning how to debug code. Open up the VLIDE and set break on error. Then load the selection: There are a couple of issues with line 3: (setq vertices (vlax-invoke pline 'vertices)) vlax-invoke requires a VLA-OBJECT (vlax-ename->vla-object pline) and a polyline does not have a vertices property, it's coordinates. Here is a common way to get LWPOLYLINE coordinates (mapcar 'cdr (vl-remove-if '(lambda (x) (/= 10 (car x))) (entget pline))) This returns ((X Y) (X Y) (X Y) (X Y)) Another way is like this which works on "heavy" polylines as well: (vlax-get (vlax-ename->vla-object pline) 'coordinates) This returns (X Y X Y X Y X Y) It does not look like you're using the vertices variable for anything except setting the num-vertices variable ? An easier way to get that number is through the 90 DXF code. (cdr (assoc 90 (entget pline)))
    1 point
  5. are you making a new polyline, so you have 2, or are you trimming the existing to the points, P1 and P2, to leave 1 polyline? If you make a copy the process will be the same after that to trim it to the points. I have something that might work, but for now a sample drawing to see what you are wanting might help
    1 point
  6. You need to give more info about what you are trying to do and the objects you are working on ..... etc
    1 point
  7. 1 point
  8. My opinion is that it's a great tool for a knowledgeable person but could be problematic for a novice like me. Because of my limited knowledge I would run the risk of having bad code, or worse, harmful code. BUT... in the right hands it's a great advancement.
    1 point
  9. Ahh, thought I had fixed that part.. add (entupd en) after the entmod lines (or is it (entupd ent) - try both and see which works)
    1 point
×
×
  • Create New...