1
AutoLISP (Vanilla / Visual) / Re: Calculate 2 stations on a self intersecting alignment.
« Last post by dexus on Today at 02:42:52 AM »Here is some code to get a list of intersections.
These are the locations you need to add the extra number.
Hope it's helpful!
These are the locations you need to add the extra number.
Hope it's helpful!
Code - Auto/Visual Lisp: [Select]
- ;|
- ; Get Intersections - dexus
- ; Returns a list of intersecting points in a polyline
- ; @Param poly Ename or vla-object of polyline
- ; @Returns List of intersecting points
- |;
- (if
- (and
- (cond
- )
- )
- )
- (LM:group-n (gc:VariantToLispData (vla-intersectwith (cadr poly) (cadr poly) acExtendNone)) 3) ; Get all intersections
- )
- )
- )
- ;; CAB 08/25/06 - revised 07.25.07
- ;; get pline vertex list for any
- )
- )
- ;; gc:VariantToLispData - gile
- ;; Converts a variant or a safearray into an AutoLISP data
- ;; input var = variant or safearray
- (cond
- )
- )
- (t var)
- )
- )
- ;; Group by Number - Lee Mac
- ;; Groups a list 'l' into a list of lists, each of length 'n'
- (if l
- (cons
- (LM:group-n l n)
- )
- )
- )