TheSwamp

Code Red => .NET => Topic started by: rom1_am on August 23, 2012, 09:54:07 AM

Title: Equivalent of Flatshot command in .Net API
Post by: rom1_am on August 23, 2012, 09:54:07 AM
Hi,

My need is to export a list of 3d solid contained in different blocks as if i was using the flatshot command (with the front view, and if possible in dxf format)

I've researched on the forum and found those topics:
http://www.theswamp.org/index.php?topic=36283.15 (http://www.theswamp.org/index.php?topic=36283.15)
http://www.theswamp.org/index.php?topic=33105.msg385443#msg385443 (http://www.theswamp.org/index.php?topic=33105.msg385443#msg385443)

Apparently it's not possible to use sendcommand with the flatshot command since we can't avoid the dialogbox.
Isn't there an equivalent of this command in the .net API?
(I use AutoCAD 2013 and C# with Visual studio express 2010)

I've also tried to understand how the 'dxfout' method works but didn't achieve to make it works.

Thanks for your help
Title: Re: Equivalent of Flatshot command in .Net API
Post by: zoltan on August 23, 2012, 11:13:32 AM
I use the Section object to create 2D views of 3D objects.  The objects don't have to intersect the section plane.
Title: Re: Equivalent of Flatshot command in .Net API
Post by: rom1_am on August 24, 2012, 05:25:43 AM
Thanks I'll try this possiblity.
Title: Re: Equivalent of Flatshot command in .Net API
Post by: rom1_am on August 29, 2012, 04:40:17 AM
We've effectively done what we wanted thanks to the GetSection method on the different solid3d objects.

Code - C#: [Select]
  1. Plane plane = new Plane(Point3d.Origin, Vector3d.YAxis);
  2. using (Region region = solid.GetSection(plane))
  3. {
  4.    ...
  5. }
  6.  
(special thanks to Gile)
Title: Re: Equivalent of Flatshot command in .Net API
Post by: insmur on June 29, 2019, 02:57:24 PM
Could you share all code;