PDA

View Full Version : If nil, skip a bit.


david.pugh
2009-07-30, 09:30 PM
Hi, again. I really need a bit of help here. This code is supposed to look up the linetype scale in entities, divide it by another variable and then put it back. Trouble is, if the entity doesn't have that scale (dxf code 48), it returns nil which messes things up. How can I use 'If' to jump two lines of code (shown in red) if nil is returned?

Thanx

ccowgill
2009-07-30, 09:50 PM
why not say (If (setq mainset (ssget ...))
that way if mainset is nil, it will skip to the end of what it should do if mainset is not nil