Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Styles to Toolbar

5 REPLIES 5
Reply
Message 1 of 6
c_c__
648 Views, 5 Replies

Styles to Toolbar

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.

5 REPLIES 5
Message 2 of 6
viktors.zilinskis
in reply to: c_c__

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

 

Message 3 of 6
Jeff_M
in reply to: c_c__

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
EESignature
Message 4 of 6
c_c__
in reply to: c_c__

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. 

Message 5 of 6
rob_leeson
in reply to: c_c__

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

Message 6 of 6
rob_leeson
in reply to: rob_leeson

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.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report