Jump to content

Recommended Posts

Posted (edited)

See if you can follow what I am trying to do:

 

I want to create a named layout view by selecting a viewport and place the name of that view in a attribute using a field by selecting the attribute. I really dont know where to start.

 

1. select viewport

2. User types name for view and view created based on viewport extents or object id

3. select attribute and update field based on view name.

4. program exits.

 

scale of viewport would also be nice. I have attached the block i will be using

 

Here is some code for selecting the vport. How do I rename the viewport ID to a string?

 

 
(defun c:DTS()
(if (setq ss (ssget "_+.:S:E" '((0 . "VIEWPORT"))))
(progn
(setq vpid (cdr (assoc 69 (entget (ssname ss 0)))))
(command "-view" "window" vpid pause)
)));progn

drawing title.dwg

Edited by markv
Added some code

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