Width and height of plt

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
krez0n
Posts: 1
Joined: 21 Feb 2008, 17:24

Width and height of plt

Post by krez0n » 21 Feb 2008, 17:28

Can I get real width and height of plt or dwg file? AbsWidth and AbsHeight always return 1.0 (((

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 26 Feb 2008, 14:33

Hello,

AbsWidth and AbsHeight must return respective values if file is valid.
Could you please send us your files for testing to support@cadsofttools.com?

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

JaviGonzalez
Posts: 4
Joined: 21 Oct 2008, 13:53

Re: Width and height of plt

Post by JaviGonzalez » 21 Oct 2008, 13:59

Hello,

Which unit of measurement does AbsWidth and AbsHeight return?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 21 Oct 2008, 14:09

AbsWidth and AbsHeight return CAD units. These values are being counted basing on entities' coordinates as they are in CAD file.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

JaviGonzalez
Posts: 4
Joined: 21 Oct 2008, 13:53

Re: Width and height of plt

Post by JaviGonzalez » 21 Oct 2008, 14:49

Thanks for the quick reply.

do you know if AbsHeight and AbsWidth will return millimeters when i set before the millimeters property (CADImage) to true? (sample code below)

CADImage cadImage = CADImage.CreateImageByExtension(path);
cadImage.Millimeters = true;
double width = cadImage.AbsWidth;
double height = cadImage.AbsHeight;

What will be stored in width and height vars?

Thanks in advance

ezanagar
Posts: 10
Joined: 24 Sep 2008, 17:42

Re: Width and height of plt

Post by ezanagar » 21 Oct 2008, 20:58

I am interested in this thread as well. I am trying to figure out how to calculate my PLT dimensions in inches.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 22 Oct 2008, 11:47

This property is obsolete. Line:

Code: Select all

cadImage.Millimeters = true;
gives nothing.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

JaviGonzalez
Posts: 4
Joined: 21 Oct 2008, 13:53

Re: Width and height of plt

Post by JaviGonzalez » 22 Oct 2008, 12:05

So, what's the way to get the real measurements in millimeters, centimeters... of the CAD file?

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 22 Oct 2008, 12:50

Can you please describe in detail what do you mean under "real measurements"? CAD file contains the whole data as CAD units, they are neither millimeters nor inches. cadImage.Millimeters defines whether CAD units to be interpreted as millimeters or inches.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

JaviGonzalez
Posts: 4
Joined: 21 Oct 2008, 13:53

Re: Width and height of plt

Post by JaviGonzalez » 22 Oct 2008, 13:26

First of all, Is there a correspondence between CAD units and inches or millimeters?

If that correspondence is not generic, I suppose that a particular CAD file should include the information of the picture real dimensions. I mean, a correspondence between cad units and real units (millimeters or inches). Does your library provide this information?

Suppose that you import a CAD file with information from a floor of a building, I must know the real dimensions of that building in 2D (length and width in millimeters or inches)

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 22 Oct 2008, 14:47

Dear Javi Gonzalez,

1 inch = 25.4 mm - this is a correspendence beetween these units.
Suppose that you import a CAD file with information from a floor of a building, I must know the real dimensions of that building in 2D (length and width in millimeters or inches)
We import data as it is. The question is how to interpret received data. Everything depends on what exactly this file contains.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

ezanagar
Posts: 10
Joined: 24 Sep 2008, 17:42

Re: Width and height of plt

Post by ezanagar » 22 Oct 2008, 21:00

Here is an example PLT file.

When I open this PLT in ABViewer and look at the File Info it tells me that Measurements : 1021x737 mm

How do I get this number in CADImport?

Thanks

E.Z.
Attachments
08-020-A100 Construction Plan - Basement Floor.zip
(174.43 KiB) Downloaded 1410 times

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 23 Oct 2008, 11:49

Currently exact measurements for PLT files are unavailable in CAD Import .NET. We will inform you when the problem is solved.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Width and height of plt

Post by support » 27 Oct 2008, 10:13

Hello!

We recommend to use the following code:

Code: Select all

	double vHeight, vWidth;
	int FMMWidth, FMMHeight;
	vWidth = this.cadImage.PureExtents.right - this.cadImage.PureExtents.left;
	vHeight = this.cadImage.PureExtents.top - this.cadImage.PureExtents.bottom;

	FMMWidth = (int)(vWidth / 40);
	FMMHeight = (int)(vHeight / 40);
it gives result in millimeters.

Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply