Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / Re: fIND AND RENAME LAYERS
« Last post by Crank on Today at 01:09:12 PM »
Quote
if old layer exists, and new layer is already there, it takes everything on old layer and puts them on new layer.
Basicly this means that you want to merge layers. If layers are used in blocks or xdata then this is a lot more complicated than renaming a layer.
Also: You can't merge layer '0' or layer 'Defpoints'.

The attached lisp is a modified version of a lisp from the expresstools. I don't use it any more, because it's very slow and new objects are not supported.

The suggestion from my previous post is fast and only needs one line of code. Just make sure that the .dws (or rename the .dws to .dwg) that you've created with the LAYTRANS command is in your search path.
Code: [Select]
(or (member "laytrans.arx" (arx)) (arxload "laytrans"))
(acet-laytrans "YourFile.dws" 7)
2
I tried Roy's code. This is what is on the command line:
Code: [Select]
Command: arcfollow
Select object:
2D point or option keyword required.
; error: Function cancelled
Specify second point of arc or [Center/End]:
Specify end point of arc:
Command: *Cancel*
3


but you know that consumers, banks, property owners, sellers, etc are going to treat it as an authoritative source, even though it's not.  Upshot will be an increase in the number of lawsuits over property boundaries....

Yes, and most likely the 'concern' of the board is that potential, that people will treat it as an actual boundary survey.
4
@ribarm:
You have misunderstood my previous post. If you step back to my code you will see that it uses the Direction option of the Arc command. According to the docs this option is also available in AutoCAD. What are your reasons for changing this part of the code?
5
@ribarm:
Thanks.
So using the Direction option, which is available in AutoCAD as well, is not feasible in that program?

There is no Direction option in AutoCAD, you only have sysvars 'LASTPOINT which is not read-only and 'LASTANGLE which is read-only...
6
@ribarm:
Thanks.
So using the Direction option, which is available in AutoCAD as well, is not feasible in that program?
7
CAD General / Re: Happy Birthday Willie
« Last post by Krushert on Today at 09:37:15 AM »
Happy Belated Birthday!!!   8-)
8
CAD General / Re: HALP... option setting eluding me..
« Last post by Greg B on Today at 09:21:19 AM »
I see spelling was eluding you too.
9
Here is AutoCAD implementation... Of course thanks to Roy...

Code: [Select]
;;; Created for: http://www.bricsys.com/common/support/forumthread.jsp?id=26089
;;; Author:      Roy Klein Gebbinck (www.b-k-g.nl)
;;; Modified:    Marko Ribar (AutoCAD implementation)

(defun c:ArcFollow ( / cmde deriv dist lst obj pt el)

  (vl-load-com)

  (if
    (and
      (setq lst (entsel))
      (setq obj (vlax-ename->vla-object (car lst)))
      (or
        (vl-position
          (vla-get-objectname obj)
          '("AcDb2dPolyline"  "AcDbArc" "AcDbCircle" "AcDbEllipse" "AcDbLine" "AcDbPolyline" "AcDbSpline")
        )
        (prompt "\nError: invalid object \n")
      )
      (or
        (equal (vlax-get obj 'normal) (trans '(0.0 0.0 1.0) 1 0 T) 1e-8)
        (prompt "\nError: object not co-planar with current UCS \n")
      )
    )
    (progn
      (setq dist (vlax-curve-getdistatpoint obj (vlax-curve-getclosestpointto obj (trans (cadr lst) 1 0))))
      (if (< dist (- (vlax-curve-getdistatparam obj (vlax-curve-getendparam obj)) dist))
        (progn ; Closer to the start point.
          (setq pt (vlax-curve-getstartpoint obj))
          (setq deriv (mapcar '- (vlax-curve-getfirstderiv obj (vlax-curve-getstartparam obj))))
        )
        (progn
          (setq pt (vlax-curve-getendpoint obj))
          (setq deriv (vlax-curve-getfirstderiv obj (vlax-curve-getendparam obj)))
        )
      )
      (setq cmde (getvar 'cmdecho))
      (setvar 'cmdecho 0)
      (setq el (entlast))
      (vl-cmdf "_.LINE" "_non" (trans pt 0 1) "_non" (trans (mapcar '- pt deriv) 0 1) "_non" (trans pt 0 1) "")
      (while (setq el (entnext el))
        (entdel el)
      )
      (vl-cmdf
        "_.arc"
        ""
      )
      (while (> (getvar 'cmdactive) 0)
        (vl-cmdf "\\")
      )
      (setvar 'cmdecho cmde)
    )
  )
  (princ)
)
10
No roy, maybe it works in BricsCAD, but in AutoCAD it doesn't...
I just tested your lisp...
Pages: [1] 2 3 ... 10