markv Posted December 22, 2011 Posted December 22, 2011 (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 December 22, 2011 by markv Added some code 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.