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

0 Members and 1 Guest are viewing this topic.

latour_g

  • Newt
  • Posts: 139
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();
            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

gile

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

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

latour_g

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