Changing options in LDD via menu [Archive] - AutoCAD Forums

PDA

View Full Version : Changing options in LDD via menu


BIGAL
24th Jul 2008, 08:10 am
Does anyone know how to add menu options that are equal to setting certain styles without the mouse clicks.

As an example changing the contour interval requires a number of menu option selections finally choosing the contour style. Just counted 6 mouse clicks!

I have no problems writing menus just need a code example.:?

rustysilo
24th Jul 2008, 04:08 pm
LDD or Civil 3D? You mention LDD in the title, but then "styles" in the post.

If C3D why not create separate surface styles with the various contour intervals you use regularly?

BIGAL
29th Jul 2008, 12:07 am
Sorry for the confusion yes we are running C3D and yes we have multiple contour styles what I was trying to do was have the style on a pull down or toolbar menu.

I need the command syntax say something like ^c^c aecgetcontoursstyle S "0.1 contours"

I dont know if you can call this from the command line. It may need VBA or lisp to go into a table and set.

BIGAL
29th Jul 2008, 06:12 am
Further to my prior email I have looked at the help files and they have a number of examples in VBA but not quite what I want

Sub setSurfaceStyle()
Dim sStyleName As String
sStyleName = "_NS1m Contours"
Dim oSurfaceStyle As AeccSurfaceStyle
Set newSurfaceStyle = g_oDocument.SurfaceStyles.Item(sStyleName)
Set osetSurfaceStyle = newSurfaceStyle
' Update all the changes we made to the drawing.
g_oCivilApp.Update
End Sub


This does no work but I am sure I am on the right path any help woule be appreciated.

rustysilo
29th Jul 2008, 01:23 pm
No idea. Try theswamp.org with this one.