Well I'm stumped.
A lot of our models are quite heavy, but they require front and back clipping planes to be applied for detailing defferent parts of an ocean going vessel. To have my team doing the "3DClip" command, is really a slow process. And because the drawing is so heavy, the 3DClip command is sketchy.
So I created the attached lisp, so that all the user has to do is follow the command line and the lisp will enable the front and back clipping planes. Basically, the point of the lisp, is to ask the user, at what point (depending on the view) do you want to focus in on. Then specify how far in front of the subject you want the plane (i.e. front clipping plane) and how far behind the subject (i.e. back clipping plane). In some views, this is a very slick lisp routine. But in some viewports, it just don't work, even in the same drawing. One viewport it works, and the other viewport it doesn't. I'm stepping through the code (the way I developed it makes sense to me) and in theory, everything adds up correctly. But for some frikken reason, it doesn't work. And now my team is not using at all, and it can be usefull. It's just not working consistently. I've attached the appropriate excerpt of the code.
Any insight would be tremendously appreciated.
Huge thanks in advance,
KP
You forgot to localize variables of main c:FC function... Maybe this is why it's unconsistent when used more times consecutively...
Try, untested though...
(defun C:FC ( / WhatFrame WhatPlane CVPort CurrentTab VPEnt Locked OldOsnap FrontClip TargetX TargetY TargetZ GetDirection GetDirectionX GetDirectionY GetDirectionZ Direction InFront Depth FClip BClip FClipValue BClipValue ) ... (princ) )
HTH, M.R.