I have the following snipped within my script
(progn
(setq pt(getpoint"\nSpecify first corner point"))
(command "pline" pt)
(while pt
(setq pt(getpoint pt"\nEnter next point, or return to close:"))
(if (or (not pt)(= pt "c"))
(progn(command"close")(setq pt nil))
) ; end if
(command pt)
)
(setq hrev_del (ssget "_L"))
(hrev)
(vl-cmdf "_.erase" hrev_del "")
) ;end progn
(defun hrev ( / )
(if (= hrev_arcsize "D")
(progn
(vlax-for o (setq s (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
(vla-Offset o -0.125))
(setq hrev_layer (ssget "_L"))
(if (tblsearch "LAYER" "Revision")
(progn
(vl-cmdf "._revcloud" "a" "1/4" "1/4" ""(ssget "_L") "")
(vl-cmdf "_.chprop" (ssget "_L") "" "LA" "Revision" "")
)
(princ "Layer Not Found??")
) ; end if
)
(progn
(vlax-for o (setq s (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object))))
(vla-Offset o -0.09375))
(setq hrev_layer (ssget "_L"))
(if (tblsearch "LAYER" "Revision")
(progn
(vl-cmdf "._revcloud" "a" "1/8" "1/8" ""(ssget "_L") "")
(vl-cmdf "_.chprop" (ssget "_L") "" "LA" "Revision" "")
)
(princ "Layer Not Found??")
) ; end if
)
)
)
I know small things like localizing variables needs to be cleaned up BUT I cant seem to figure out why making the poly line counter clockwise the vla-offset, offsets correctly but making the polyline clockwise causes the offset to occur opposite (+ instead of -). Do I need to include a catch for the direction of polyline or a catch to reverse the polyline?
//update
Doh! Definitely have to adjust the offset based on direction.