Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

autolisp for checking what the current / active space is..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
0
0
GB
Hi,

I'm not too hot on autolisp and need to know how to check what the current / active space is..

ie: if active space is modelspace then blah blah
else if active space is paperspace then blah blah blah

basically, i want to swap to a different dim style dependent on which space i'm in.

any help would be great, thanks

Cheers,
Paul @ basepoint designz ltd..

basepointdesignzltd
 
This should get you started

(defun c:Inscale (/ ip)
(setq tm (getvar "tilemode")); This is the variable you are looking for
(if
(= tm 0)
(progn
(alert "You Are Currently in Paper Space\nYou Will Be Switched to Model Space")
);progn
);if
(command "tilemode" 0)
(setq #ds (getvar "dimscale"))
(setq #cl (getvar "clayer"))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top