OMEGA-ThundeR Posted September 30, 2013 Posted September 30, 2013 Hi, When i want to switch a surface style (lets say from triangles to points) i have to rightclick the surface in the toolspace or edit it in the properties window when i select the surface in my drawing. And there are probably some other ways to, but i want to 'lisp' it. Is there a way to change it on the command bar? My level of lisp writing is very basic, so unless i can do it on the command bar i can't make it. Any tips? FYI; i got surface styles naming like AAA-TRIANGLES and - AAA-POINTS. Quote
rkmcswain Posted September 30, 2013 Posted September 30, 2013 Code can be found here. It will need a minor addition if you are running C3D 2012, 2013, or 2014. Post back if you need help with it. I tested it here, and it works. http://www.cadtutor.net/forum/showthread.php?49417-Changing-CIV3d-contours-simply&p=381249&viewfull=1#post381249 Quote
OMEGA-ThundeR Posted September 30, 2013 Author Posted September 30, 2013 popups and selecting things allready seem like a drag... i basicly just want to click on a surface (having it selected/active) and typ in a command, press enter and the style changes.. i.e. When i select a surface and just type in 'triangles' and it goes to a predifined state. Maybe the linked program can be used on the command bar? Writing a lisp on that? Quote
rkmcswain Posted September 30, 2013 Posted September 30, 2013 I think the reason for the dialog is in case the surface you want to change is not select-able. Here is some quick, rough code for using a selection instead of picking from a dialog. (setq se (entsel)) (setq el (entget (car se))) (setq et (cdr (assoc 0 el))) (if (eq et "AECC_TIN_SURFACE") (progn (setq obj (vlax-ename->vla-object (car se))) (vlax-put-property obj "SurfaceStyle" ***styleobject***) (more stuff here....) ) ) Quote
BIGAL Posted October 1, 2013 Posted October 1, 2013 The code in the link by me uses a toolbar for its pick it has the majority of styles preset that we would normally use and includes a turn off surface style it also handles multiple surfaces turned on at same time. Have a look at the ZIP file it has the toolbar in it. It turns on surfaces even if not currently displayed. I think its as close as you could want. Any questions just post There is also a pt style version available. Thanks rkmcswain Quote
rkmcswain Posted October 1, 2013 Posted October 1, 2013 Thanks rkmcswain Thanks to you for posting this code. Very nice. Quote
BlackBox Posted October 1, 2013 Posted October 1, 2013 Nice job, Al - You might also be interested in using a custom Contextual Ribbon Tab (when RIBBONSTATE == 1 in lieu of the toolbar, etc.), which would make it seem more 'native' to Civil 3D, and also account for surface(s) that are selected and not currently being displayed (right click --> select via Toolspace, etc.). For non-Implied selections, the dialog seems appropriate, regardless of RIBBONSTATE. ... Great topic, in deed. Quote
BIGAL Posted October 2, 2013 Posted October 2, 2013 Comments taken on board ver 3? Ver 2 was to fix Icons Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.