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: 

need help with making a lisp

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
htls69
465 Views, 5 Replies

need help with making a lisp

so i was wondering if one you smart guys here could help me out

 

i need a lsp routine that i can associate with a toolbar button that will reset the "table tag renumbering" "line stating number & curve starting number" the the number 1 with out me having to open 2 different dialog boxes.

 

if this is easy and can be done i would really appreciate it

(see Picture for what i want to change)

 

autodesk civil 3d 2012 all updates applied

win7 x64

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
5 REPLIES 5
Message 2 of 6
Jeff_M
in reply to: htls69

The properties to get/set these values are not available in the COM/ActiveX API. They are, however, available in the .NET API for 2013+.

 

So, no to the lisp, no for something in 2012, yes it could be done with a .NET application for 2013+

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 6
htls69
in reply to: Jeff_M

WE ARE MOVING TO CIVIL 3D 2015 IN 3 MONTHS

 

would be nice if you could create that for me please

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 4 of 6
Jeff_M
in reply to: htls69

Attached is a zip file with a .NET dll. After downloading, find the zip file with Windows Explorer, right click on it, select Properties. On the General tab, be sure there is no button labeled "Unblock", if there is one, click it, then exit the properties. Now extract the dll to a location you will remember, and, in 2014/2015, is a Trusted path. Load it into C3D2013, 2014, or 2015 with the NETLOAD command, this can be added to your acad.lsp file to auto load it everytime C3D is started. Once loaded, the command is "ResetRenumberingTo1".

 

For those curious about the actual code, this is it, in it's entirety:

using Autodesk.AutoCAD.Runtime;
using Autodesk.Civil.ApplicationServices;
using Autodesk.Civil.Settings;

namespace ResetRenumbersToOne
{
    public class ResetRenumbersToOne
    {
        [CommandMethod("ResetRenumberingTo1")]
        public void resetrenumbersto1()
        {
            CivilDocument civdoc = CivilApplication.ActiveDocument;
            SettingsTag settings = civdoc.Settings.TagSettings;
            settings.Renumbering.CurvesStartingNumber = 1;
            settings.Renumbering.LinesStartingNumber = 1;
        }
    }
}

 

Jeff_M, also a frequent Swamper
EESignature
Message 5 of 6
htls69
in reply to: Jeff_M

i dont see the zip file

 

can you email it to be at allenrobberson at gmail dot com

Allen Robberson
Credit where credit is due! Give kudos or accept as solution whenever you can.
Message 6 of 6
Jeff_M
in reply to: Jeff_M

here's the file, sorry about that.

Jeff_M, also a frequent Swamper
EESignature

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report