AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Distinguished Contributor
clay_carr
Posts: 145
Registered: ‎10-06-2008
Message 1 of 6 (369 Views)

Styles to Toolbar

369 Views, 5 Replies
08-03-2012 01:10 PM

I saw this post but can't find a good way to get my styles written to a toolbar:

 

http://forums.autodesk.com/t5/AutoCAD-Civil-3D-Customization/Civil-3D-Styles-to-Toolbar/m-p/2879870/...

 

do I simply write a lisp routine and put the shortcut name in my toolbar command line?  I don't know what the "change surface style" command is.  Please help.  Thanks.

Active Contributor
viktors.zilinskis
Posts: 40
Registered: ‎02-17-2010
Message 2 of 6 (344 Views)

Re: Styles to Toolbar

08-05-2012 01:43 PM in reply to: clay_carr

I am somewhat unsure whether it can done on AutoLisp, but you can at least get some kind of a handle (in my case it looks like  Style = #<VLA-OBJECT IAeccSurfaceStyle 1547ffe0>) for a style used for a surface like that:

(setq ent (car (entsel "\nSelect Main Object: ")))
(setq oEnt (vlax-ename->vla-object ent))
(vlax-dump-object oEnt)

 Then I do not know whether you can only see it or even change. Another option which should work at least for 2013 is to write several commands in .net and then add them to a toolbar. I can think of two alternatives: either you have lots of styles in the drawing and each of the commands change the style of a surface to one of them, or these commands change the current surface style (it should not be a problem if you name surface style after your surface's name). Hope this helps somehow.

 

BR, Viktors

 

*Expert Elite*
Jeff_M
Posts: 4,387
Registered: ‎07-22-2003
Message 3 of 6 (343 Views)

Re: Styles to Toolbar

08-05-2012 01:57 PM in reply to: clay_carr

What do you want on the toolbar? Give some specifics and I may be able to point you in the right direction.

Jeff_M, also a frequent Swamper
Distinguished Contributor
clay_carr
Posts: 145
Registered: ‎10-06-2008
Message 4 of 6 (329 Views)

Re: Styles to Toolbar

08-06-2012 07:32 AM in reply to: clay_carr

for examle I have a "_JS-no display" style that i toggle to "JS - Proposed Contours 1' and 5'" frequently.  Ultimtaley i would like to build a toolbar and share with everyone at this firm to have all (lets say 20) surface styles.  This may also be helpful with spot elevations that have different rotations. 

Active Member
ahouston
Posts: 6
Registered: ‎08-25-2009
Message 5 of 6 (217 Views)

Re: Styles to Toolbar

02-10-2013 03:37 PM in reply to: clay_carr

Search under my name I posted yesterday the code in VLISP to do what you want at another post.

Active Member
ahouston
Posts: 6
Registered: ‎08-25-2009
Message 6 of 6 (94 Views)

Re: Styles to Toolbar

02-27-2014 01:20 PM in reply to: ahouston

Please find attached a zip file with an example of using a toolbar to manage the surface styles, includes off select desired cont interval and supports multiple surfaces. I t does require minor editing of contour style names to match user names.

 

 

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.