Jump to content

Recommended Posts

Posted

This is my first attempt to manipulate AcDbViewport Objects (learning exercise), and cannot seem to find the solution on my own.

 

I've successfully created an viewport in PaperSpace at the correct location, and already have a named Model view, but for some reason cannot successfully apply said view to the viewport.

 

Snip:

 

;; Create viewport
(setq vp
 (vla-addpviewport
   (vla-get-paperspace *activeDoc*)
   (vlax-3d-point '(8.6477 5.56637 0.0))
   16.0
   9.84))

;; Set view
(vla-put-modelview vp (vla-item (vla-get-views *activeDoc*) "1"))

 

The latter portion returns this error:

 

; error: Automation Error. Description was not provided.
_$ 

 

... Which is confusing as there is no description called for from the developer documentation; only the Object (PViewport), and the ModelView (View object).

 

Any help would be greatly appreciated!

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