I like to put in the LM:GRX cross if Z is not 0.0. Very Useful for functional display and give user a hint there might be something wrong in the value (2D speaking). Checking for polyline join. Wish this turn into => entget / foreach for a selection.
To be nice to be able to display a complete selection this way.
If user decides to pass only 1 element then finish with statement (sssetfirst nil (ssadd ent (ssadd)))
Here is my code sofar, i'm going to dive in my archive for some good eaxples for a foreach statements
Dubb, hope you do't mind ..
(defun c:showSE (/ ent enx ptS ptE ptSz ptEz)
; (load "GrTextV1-1.lsp") ; Code needed : Lee Mac
; KGA_Geom_MatrixMake and LM:grx_BC for BricsCAD by Roy Klein Gebbinck
;; Display GrText - Lee Mac
;; pnt - cursor point in UCS
;; vec - GrText vector list
;; col - Text Colour (ACI Colour)
;; xof - x-offset from cursor in pixels
;; yof - y-offset from cursor in pixels
(if (and
(setq ent (car (entsel "\nSelect a (poly)line: ")))
(member (cdr (assoc 0 (setq enx (entget ent))))
'("LWPOLYLINE" "LINE" "ARC" "SPLINE" "POLYLINE")
)
(not (vlax-curve-isClosed ent)) ; so it will be an open curve
)
(progn
(setq ptS (vlax-curve-getStartPoint ent))
(setq ptE (vlax-curve-getEndPoint ent))
(setq ptSz (caddr ptS))
(setq ptEz (caddr ptE))
(if (= ptSz 0)
()
(if (= "BRICSCAD" (strcase (getvar 'product)))
(progn
(LM:grx_BC ptS 10 3)
)
(progn
(LM:grx ptS 10 3)
)
)
)
(if (= ptEz 0)
()
(if (= "BRICSCAD" (strcase (getvar 'product)))
(progn
(LM:grx_BC ptE 10 1)
)
(progn
(LM:grx ptE 10 1)
)
)
)
(LM:DisplayGrText ptS (LM:GrText (strcat "S")) 3 10 -25)
(LM:DisplayGrText ptE (LM:GrText (strcat "E")) 1 10 -25)
(setq ptS nil)
(setq ptE nil)
(setq ptSz nil)
(setq ptEz nil)
(sssetfirst nil (ssadd ent))
)
)
)
[\code]