I am having a very odd experience: Basically I have a list of 3d polyline, and I use the extrude command to create 3D solids for each object inside this list. 1st time running: Only first 10-20 objects can be extruded. (For others, there's an error message of: Unable to extrude the selected object.) Then I delete all and run this program again 2nd time running: All objects CAN be extruded. So what's wrong with it? The following is the core part: (make-3dpolyline ptlist) ;Create a 3d polyline from list (setq ss1 (ssget "L")) ;Get the newly made 3d polyline (setq tmpH (car (cddddr item))) ;Get the Height from somewhere (command "Extrude" ss1 "" tmpH "") ;Execute Extrude (setq ss1 nil)
hi all, I found a little bit more hints! The fact is that: for those objects outside the viewing area, they get problem!!! So when I zoom out to a reasonable extent, and then run the program, it works!!!! Can anyone tell me why is that? And what is the common way to handle this problem? (Since when the data getting larger and larger, the program should handle what would be the viewing area) My guess is that the (ssget) cannot get an object outside the viewing area, anyway I'm not sure. Thanks all
The problem is not ssget, but (ssget "L"). "Last" behaves this way. Try using (entlast) instead ssget: (command "Extrude" (entlast) "" tmpH "")