
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to all:
I am using LISP routines to send geometry in a block to various layers depending on certain conditions. I am stuck at this issue: I want to send a closed polyline with 4 vertices to one of two layers based on the following criteria:
If the y-coordinate of the first vertex matches the y coordinate of the second vertex,
-then put the polyline object on the "ROLLERS" layer
Else if the x-coordinate of the first vertex matches the x coordinate of the seCond vertex,
-then put the polyline object on the "FRAMES" layer
Here's how it would fit in my program:
..............
(setq ymatch (cdr(vlax-get b 'coordinates)) ;;NOT SURE ABOUT THIS PART IN PARTICULAR
;;getting each line/polyline object
(cond ;;applying conditions here
((and (vlax-curve-isclosed b)
(equal vnum 4)
(????) if the Y-coordinate of the first vertex matches the Y coordinate of the second vertex
)
;;the object is a closed polyline WITH 4 VERTICES MATCHING THE FIRST CONDITION MENTIONED ABOVE
(addprop b "HILMOT-CONV-BLK-ROLLERS")
;; then add to this layer
)
((and (vlax-curve-isclosed b)
(equal vnum 4)
(????) if the X-coordinate of the first vertex matches the X coordinate of the second vertex
)
;;the object is a closed polyline WITH 4 VERTICES MATCHING THE SECOND CONDITION MENTIONED ABOVE
(addprop b "HILMOT-CONV-BLK-FRAMES")
;; then add to this layer
)
Does my request make sense? Basically...
If the Polyline resembles a telephone pole standing up, it should go on the "ROLLERS" layer
If the Polyline resembles a telephone pole laying on the ground, it should go on the "FRAMES" layer
Thanks for any help in this matter!
Solved! Go to Solution.