Jump to content

Move object from insertion to ucs point


Emmanuel Focus Electrique

Recommended Posts

Hi,

I'm a new Autolisp user and with Lee Ambrosus Book, I wrote this following code. I want to search a specific object in my block and move this one in a specific point (absolute coordinates). But what I saw, this Object move as a translation (Relative coordinates).

So how change my code to move my object in the specific UCS coordinates.

(if (setq ss (ssget "_X" '((2 . "RATING1"))))
(progn
(setq ent_data (entget (ssname ss 0)))
(setq ent_data (ssname ss 0))
(setq obj (vlax-ename->vla-object ent_data))
(setq insPt (vlax-get-property obj 'insertionpoint))
(setq ca (vlax-variant-value insPt))
(setq pt (vlax-safearray->list ca))
(sssetfirst nil ss)
(command "._move" ss "" pt '(6.0 -18.0 0.0))))

 

Thanks

 

Emmanuel

Link to comment
Share on other sites

Welcome to the forum. Thank you for sharing your experience, someone else may benefit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...