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: 

Select graphically TinVolumeSurface, not TinSurface

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
joantopo
390 Views, 3 Replies

Select graphically TinVolumeSurface, not TinSurface

 PromptEntityOptions entOpts2 = new PromptEntityOptions("\nSelect Volume Surface (only TIN): ");

            var _with2 = entOpts2;
            _with2.SetRejectMessage("\nObject invalid.");

       _with2.AddAllowedClass(typeof(Autodesk.Civil.DatabaseServices.TinVolumeSurface), true);
        
            _with2.AllowNone = true;
            _with2.AllowObjectOnLockedLayer = true;
            PromptEntityResult entRes2 = ed.GetEntity(entOpts2);
            if (entRes2.Status != PromptStatus.OK)
                return;

 I have problems because I allow only TinSurfaceVolume to select but Civil 3D allow me TinSurface too.

Why?

 

 

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
3 REPLIES 3
Message 2 of 4
joantopo
in reply to: joantopo

Well, I do this with transaction :

 

 ObjectId IdsuperficieVolumen = entRes2.ObjectId;
           

            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                CivDb.Surface SupSelect = (CivDb.Surface)IdsuperficieVolumen.GetObject(OpenMode.ForRead);
                if (SupSelect.IsVolumeSurface == false)
                {
                    MessageBox.Show("La superfície seleccionada no es una superfície de Volumen.\nComando finalizado.", "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    ed.WriteMessage("\n");
                    return;

                }

 

But, can I do it without transaction during the prompt?

 

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 3 of 4
Jeff_M
in reply to: joantopo

Nope, can't do it without the Transaction. (Well, you could just use Open/Close directly without a Transaction.) Even though the API differentiates between a TinSurface and a TinVolumeSurface, the underlying objects both have the same DXF name "AECC_TIN_SURFACE".

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

Yes, you´re right.

 

Moreover, I don´t like why Civil 3D differenciates some properties for TinVolumeSurface and GridVolumeSurface for VolumeSurfaceProperties.

I have to create an instance for TinVolumeSurface and another for GridVolumeSurface to get volume. I have to repeat the same code for each case.

 

 

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

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report