offset created from point marker object

offset created from point marker object

ishaq03
Advocate Advocate
438 Views
6 Replies
Message 1 of 7

offset created from point marker object

ishaq03
Advocate
Advocate

Hi everyone,

 

I have a point marker objects in my dwg, I would like assign the offset to point markers as a  perpendicular if curser move left side offside should be left if curser move to right side offset should be right side same like AutoCAD default offset command but here my entity is not polyline it's a point markers.  kindly check my attached dwg for more understanding.

 

ishaq03_0-1654427394322.png

 

 

 

0 Likes
439 Views
6 Replies
Replies (6)
Message 2 of 7

ishaq03
Advocate
Advocate

Any Help Please.

0 Likes
Message 3 of 7

Sea-Haven
Mentor
Mentor

A few different ways CHX CHY comes to mind, a command U0.15 L0.15 using a reactor where 0.15 can be any value, or simpler a lisp and just type U0.15 D0.15 R0.15 L0.15 and so on. 

 

Smarter people than me will use GRREAD to detect direction.

 

Another can detect which arrow you press.

 

So for me a simple answer a smart answer hopefully some one else.

Pleas feel free to play with this

 

; Enter the filet radius as part of a command line entry f100 offset O234 circle c123-45 
; changed to x  move y & z to be added
; note - is used for decimal point
; original code and methology by Alan H
; assistance and code that worked by Lee-Mac
; OCT 2015
 
(   (lambda nil
        (vl-load-com)
        (foreach obj (cdar (vlr-reactors :vlr-command-reactor))
            (if (= "ahmove-reactor" (vlr-data obj))
                (vlr-remove obj)
            )
        )
        (vlr-command-reactor "ahmove-reactor" '((:vlr-unknowncommand . ahmove-reactor-callback)))
    )
)

(defun movex ( )
       (setq xval (distof (substr com 2) 2))
            (if (< 0.0 xval)
            (progn 
            (setq pt1 (list 0.0 0.0 0.0))
	    (setq pt2 (list xval 0.0 0.0))
            (setq ent (entsel "select object"))
            (vla-sendcommand ahmove-reactor-acdoc "_.Move !ent  !pt1 !pt2 ")
            ;(command "move" ent "" pt1 pt2) for Briscad
            (setq pt1 nil pt2 nil ent nil)   
            )
            )
)
(defun movey ( )
       (setq yval (distof (substr com 2) 2))
            (if (< 0.0 yval)
            (progn 
            (setq pt1 (list 0.0 0.0 0.0))
	    (setq pt2 (list 0.0 yval 0.0))
            (setq ent (entsel "select object"))
            (vla-sendcommand ahmove-reactor-acdoc "_.Move !ent  !pt1 !pt2 ")
            ;(command "move" ent "" pt1 pt2) for Briscad
            (setq pt1 nil pt2 nil ent nil)   
            )
            )
)
(defun ahmove-reactor-callback ( obj com )
(setq com (vl-string-translate "-" "." (strcase (car com))))
    (cond   
        (   (and
            (wcmatch com "~*[~X.0-9]*")
            (wcmatch com "X*")
            (wcmatch com "~X*X*")
            (wcmatch com "~*.*.*")
            ) ; and
            (movex) 
         ) 
(   (and
            (wcmatch com "~*[~Y.0-9]*")
            (wcmatch com "Y*")
            (wcmatch com "~Y*Y*")
            (wcmatch com "~*.*.*")
            ) ; and
            (movey) 
         ) 
    ) ; master cond
) ; defun

(if (not ahmove-reactor-acdoc)
    (setq ahmove-reactor-acdoc (vla-get-activedocument (vlax-get-acad-object)))
)
0 Likes
Message 4 of 7

ishaq03
Advocate
Advocate

Kindly if any body help me to provide me a lisp as my request very soon it's highly appreciated 

0 Likes
Message 5 of 7

Sea-Haven
Mentor
Mentor

Press F8 ortho on, move select object, drag in direction type 0.15 done. Hey all done no code !!

Message 6 of 7

ishaq03
Advocate
Advocate

sorry, I didn't get the lisp shortcut name. means after upload what is the shortcut name

0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

I don't understand what you are asking.  You say you want it "perpendicular," which from the rest of the description I assume means only horizontal, but your illustration shows two Points that are the distance apart that you mention but with a diagonal direction between them.  What is the point of illustrating with something that is not what you are asking for?  Or am I misunderstanding?  Also, "offset" is an operation associated with objects that have linearity, not a concept that I associate with Points.  Are you just talking about making a Copy of the Point?  I think I agree with @Sea-Haven in Message 5, with perhaps Copy instead of Move -- does that not do what you want?

Kent Cooper, AIA
0 Likes