Jump to content

Help me to fix an old viwport grid lisp.


Recommended Posts

Posted

Hi , I use this lisp for years but I have a problem. When I Polyline on layout and select to create viewport from object , when I select the new viewport in properties say VIewport (1) and not Viewport. Then when  I run the attach lisp to create the grid on viewport say that no viewport selected. Can any one help me to fix this ?

 

Thanks

1.jpg

Surveygridneg.lsp

Posted

It says Viewport (1) because you've created a Viewport by object (Polyline), so they're linked. 

 

Your code works fine here and only seems to error when the Viewport is on a locked layer, and the linked Polyline is not... but I am unable to produce the 'no viewport selected' you mentioned. 

Posted
11 minutes ago, mhy3sx said:

Is any way the code to support  Viewport (1) ?

 

Thanks

It already supports that. 

 

Viewport (1) just means that there's 1 object linked... click the dropdown and you'll see the Viewport and Polyline. 

 

The code only allows selection of "VIEWPORT", so when you select it on screen, the Polyline is ignored. 

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