Author Topic: Calculate area of Solid3D  (Read 203 times)

0 Members and 1 Guest are viewing this topic.


  • Newt
  • Posts: 141
Calculate area of Solid3D
« on: March 04, 2019, 04:42:25 PM »
Hi all,
I have a command that calculate the area of differents objets.  You can either select object one by one or with a selection set.
One by one is working fine, Solid3D are detect but for selection set is not working.  I'm not sure what I'm doing wrong..

One by one (working fine) :
Code: [Select]
            PromptEntityOptions opts = new PromptEntityOptions("Sélectionner des objets");
            opts.SetRejectMessage(RESM.getText("NoLinePline", UTIL.cUtLang));
            opts.AddAllowedClass(typeof(Polyline), false);
            opts.AddAllowedClass(typeof(Circle), false);
            opts.AddAllowedClass(typeof(Spline), false);
            opts.AddAllowedClass(typeof(Solid3d), false);
            PromptEntityResult per = ed.GetEntity(opts);

Selection set (not working for solid3d, but for pline and every othre it's working fine) :
Code: [Select]
            TypedValue[] values = new TypedValue[] { new TypedValue((int)DxfCode.Start, "LINE,ARC,CIRCLE,POLYLINE,SPLINE,ELLIPSE,LWPOLYLINE,SOLID3D,SOLID") };
            SelectionFilter filter = new SelectionFilter(values);
            PromptSelectionOptions SelOpts = new PromptSelectionOptions();
            SelOpts.AllowDuplicates = false;
            SelOpts.MessageForAdding = RESM.getText("SelObj", UTIL.cUtLang);
            SelOpts.MessageForRemoval = "Désélectionner objet";

            PromptSelectionResult res = ed.GetSelection(SelOpts, filter);

Thank you


  • Water Moccasin
  • Posts: 2204
  • Marseille, France
Re: Calculate area of Solid3D
« Reply #1 on: March 04, 2019, 05:08:40 PM »

The DXF name for Solid3d (used in selection filters) is: 3DSOLID.
Speaking English as a French Frog


  • Newt
  • Posts: 141
Re: Calculate area of Solid3D
« Reply #2 on: March 05, 2019, 09:14:43 AM »
Thank you really much !