Jump to content

Modify centre of viewport with vla-put-center


JamCAD

Recommended Posts

Hi,

 

I'm trying to use visual lisp to automate setting up viewports. The trouble is when I try to change the centre. As a basic example

(setq entv (vlax-ename->vla-object (car (entsel))))
(vla-put-center entv '(500.0 200.0 0.0))

returns the following error:

; error: lisp value has no coercion to VARIANT with this type: (500.0 200.0 0.0)

(vla-get-center entv)

Returns:

#

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...