TheSwamp

Code Red => .NET => Topic started by: latour_g on March 04, 2019, 04:42:25 PM

Title: Calculate area of Solid3D
Post by: latour_g 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();
            Utils.SetFocusToDwgView();
            SelOpts.AllowDuplicates = false;
            SelOpts.MessageForAdding = RESM.getText("SelObj", UTIL.cUtLang);
            SelOpts.MessageForRemoval = "Désélectionner objet";
            Utils.SetFocusToDwgView();

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

Thank you
Title: Re: Calculate area of Solid3D
Post by: gile on March 04, 2019, 05:08:40 PM
hi,

The DXF name for Solid3d (used in selection filters) is: 3DSOLID.
Title: Re: Calculate area of Solid3D
Post by: latour_g on March 05, 2019, 09:14:43 AM
Thank you really much !