[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Detect Civil 3D Surfaces
Tip# 4169 By Mathew Kirkland On 29-Jul-2013
Rated By 0 users Downloaded : 233
Categories : LISP Code Modules, Programming Examples
Software type : AutoCAD Civil 3D
Rename File To : c3d-get-surfaces.lsp
If one or more surfaces are found, this function returns a grouped pair.

Mat Kirkland delivers a small but powerful routine that will detect AutoCAD Civil 3D surfaces in a given drawing file. You'll probably want to use this as part of a larger routine. Mat's function requires one argument, and that is a reference to an ActiveX document which at the most basic level can be obtained with the function (vla-get-activedocument (vlax-get-acad-object)). If one or more surfaces are found, this function returns a grouped pair, where the first element is an integer representing the number found, and the second element is a list of the Vla-Objects found


Average Rating:

User comments
Comment by Maeding,James
Posted on 2013-07-29 14:35:53
you can also detect all AEC objects with the SSX command provided by Express Tools. Type SSX, enter for None, E for entity type, aec* that will select all objects whose type starts with aec, which inclused all civil 3d and other vertical "arx" objects. to see what they were, type LIST, then P for previous. It will show the details of each object. This is a general technique, useful for many things like revealing invisiblke things like text with no value, or zero length linetypes. For that, you can run LIST, then type ALL to select all, then R to remove and pick everything visible. That will leave you with only invisible items selected and the troubleshooting begins.
Comment by CAD,BlackBox
Posted on 2013-08-16 08:39:59
@James - Like all Command calls, the SSX Command is only available to the ActiveDocument which must be open in the Editor... As I understand it (and I could be wrong), Mat's sub-function can be used on any Document in the Documents Collection (doesn't have to be the ActiveDocument), and supports ObjectDBX for batch processing. Cheers