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: 

Erase site.

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
joantopo
708 Views, 7 Replies

Erase site.

Is it possible to erase a site? For example: I have an empty drawing. I create a new site. Then, I create a new feature line within that site. Finally, I delete that featureline and afterwards that site but debugger says: eNotApplicable. There aren´t any featurelines in that site.
Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
7 REPLIES 7
Message 2 of 8
Jeff_M
in reply to: joantopo

No. I inquired about this last month: http://forums.autodesk.com/t5/AutoCAD-Civil-3D-Customization/Removing-Sites/td-p/4687437

Partha has logged it as a change request.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 8
joantopo
in reply to: Jeff_M

ok. Thanks.
Autocad C3D 2019 SP3, 2020 & 2021
Intel I9 9900K with frontal watercooler alphacool eisbaer 360 (original fans mounted in pull)- 3 fans Corsair 120 ML PRO in push.
MOBO Gygabyte Z390 Aorus Master- Corsair RGB Vengeance 64GB RAM (4x16) CL16
Nvidia Quadro RTX 4000
Samsung 970 EVO PLUS 1TB (unit C). Samsung 970 PRO 512GB (for data)
Power Supply: Corsair TX850M PLUS


Descubre mi programa VisorNET para Civil 3D:
https://apps.autodesk.com/CIV3D/es/Detail/Index?id=appstore.exchange.autodesk.com%3avisornet_windows32and64%3aes
Message 4 of 8
Anonymous
in reply to: joantopo

Hi,

 

As Jeff mentioned, this is in out list now.

 

Thanks,

Message 5 of 8

Nooooooooooooooooooooooooo!!!!!!!!!!!!!!!!

 

This sucks, doesn't appear to have been added after 7 years. Partha indicated it would be addressed in the "coming days.". I guess it should have been "coming decades."

Message 6 of 8
Jeff_M
in reply to: Christopher.Fugitt

Hey @Christopher.Fugitt , I had some time to play today so I decided to try to get this to work using COM without the COM libraries loaded. This worked without issue:

        [CommandMethod("junk")]
        public void junk()
        {
            var str = GetCivilAppString("Land");
            dynamic acadApp = Application.AcadApplication;
            dynamic aeccApp = acadApp.GetInterfaceObject(str);
            dynamic aeccDoc = aeccApp.ActiveDocument;
            dynamic sites = aeccDoc.Sites;
            try
            {
                sites.Remove("Site");
            }
            catch { }
        }

        /// <summary>
        /// module must be "Land", "Pipe", "Roadway", or "Survey"
        /// </summary>
        /// <param name="module"></param>
        /// <returns>AeccApp string</returns>
        string GetCivilAppString(string module)
        {
            var retval = "";
            var ucm = HostApplicationServices.Current.UserRegistryProductRootKey;
            var lm = "HKEY_LOCAL_MACHINE\\" + ucm;
            var hj = Registry.LocalMachine.OpenSubKey(ucm);
            var c3d = (string)hj.GetValue("Release");
            c3d = c3d.Substring(0, c3d.IndexOf(".", (c3d.IndexOf(".") + 1)));
            hj.Close();
            retval = "AeccXUi" + module + ".Aecc" + (module == "Land" ? "" : module) + "Application." + c3d;
            return retval;
        }
Jeff_M, also a frequent Swamper
EESignature
Message 7 of 8

Thanks Jeff!

It looks like the .net Site.Erase() does remove the site, but still returns the "eNotApplicable" and removes it from Toolspace. Doing an Audit brings the deleted site back.

Message 8 of 8
davilavanegas
in reply to: Jeff_M

Thanks,

 

Really Helpfull.


______________________
RDV - Rinat Dávila Vanegas  | LinkedInYouTube | Facebook


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

Post to forums  

Rail Community


 

Autodesk Design & Make Report