JamCAD Posted March 30, 2015 Posted March 30, 2015 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: # Quote
JamCAD Posted March 30, 2015 Author Posted March 30, 2015 vlax-make-safearray or vlax-make-variant? I haven't used either function before and couldn't get it to work. Quote
hanhphuc Posted March 30, 2015 Posted March 30, 2015 hi missing (vla-put-center entv ([color="blue"]vlax-3d-point[/color]'(500.0 200.0 0.0))) Quote
JamCAD Posted March 30, 2015 Author Posted March 30, 2015 hi missing (vla-put-center entv ([color=blue]vlax-3d-point[/color]'(500.0 200.0 0.0))) I thought it would be simple Quote
Lee Mac Posted March 30, 2015 Posted March 30, 2015 FWIW, You can also omit the list format & z-value, e.g.: (vla-put-center entv (vlax-3D-point 500 200)) Quote
Recommended Posts
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.