Strydaris Posted June 12, 2024 Posted June 12, 2024 Hey everyone, Hopefully someone can help me out here. What I am looking to do is to create a lisp that knows the difference between regular model space, paper space and an active viewport in paper space. I looked into cvport, but to my understanding its just a system variable for PS and MS. cvport = 1 for PS and cvport = 2 for MS This cvport cant tell the difference between and active viewport in PS and actual MS. The reason why I want to know the difference between the 3 is that I want to create a conditional LISP. Run the lisp it does... X for Model space Y for Paper Space and Z for Active viewport in Paper space I know there is a way of doing this, probably using Visual Lisp and some combination of VLA functions which I dont know very well. Anyone have any ideas? Thanks. Quote
CyberAngel Posted June 12, 2024 Posted June 12, 2024 You should be able to test the current document with vla-get-mspace for :vlax-true or :vlax-false. See this thread, especially Lee Mac's code. A true result means the viewport is in model-space mode. Not 100% sure about that... wait, I checked, and it works! The tilemode variable will tell you whether you're on a layout tab. That should do it. 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.