Search Site:

About

Linux

Printers?

Programming

Windows?

Download

Skins

Edit - To Do - AllRecentChanges

Recent Changes Printable View Page History Edit Page

Download.Cad2text History

Hide minor edits - Show changes to markup

Wednesday 15 May 2013, at 01:23 GMT+8 by 202.60.234.212 -
Added lines 1-6:

(:table border=0 cellpadding=5 cellspacing=0 bgcolor=#ffffa1:) (:cellnr:) This project has been discontinued as I no longer have the license to use the necessary SDK. (:tableend:)


Thursday 29 November 2012, at 11:35 GMT+8 by 202.60.234.212 -
Changed line 72 from:
to:
  • As of December 2012, I am no longer licensed to provide the freeware download.
Thursday 17 November 2011, at 07:31 GMT+8 by 192.168.0.234 -
Deleted lines 0-3:

IMPORTANT:The compiled version of this tool is no-longer available as the OpenDesign Alliance, providing the library for accessing CAD data, requires the payment of a yearly fee, even for free (as in beer) software.
As per their requirement, I had to remove the compiled software from download.
I have left the source code here, but there is no longer any executable that contains any property from the OpenDesign Alliance.

Changed lines 39-41 from:

It is important to note that this utility relies on the OpenDesign Alliance OpenDWG Toolkit and Viewkit libraries.
It is no longer free (US$250 first time/US$100 yearly renewal fee) to become a basic Associate Member and you need to sign an agreement and you cannot redistribute the library or use them in commercial products. Because I cannot afford to pay the membership fee for providing a free tool, you will have to get your own membership and compile the software if you want to use it (see OpenDesign Alliance website for details).

to:

It is important to note that this utility relies on the OpenDesign Alliance OpenDWG Toolkit and Viewkit libraries. It is free to become a basic Associate Member, but you need to sign an agreement and you cannot redistribute the library or use them in commercial products. This is why there is a pre-compiled version of cad2svg included: you can use this free software, but to compile it yourself, you'll need to obtain the library from the OpenDesign Alliance.

The pre-compiled package is a static binary, so there is no pre-requisite requirements to use it.

Added line 43:

Do this only if you need to.

Changed line 46 from:
  • gcc
to:
  • gcc (any version less than 2 year old should work and should already be installed on your machine, otherwise, apt-get? install gcc)
Changed lines 65-68 from:

The compiled application relies on copyrighted software libraries available from the Open Design Allianc. These libraries are subject to a membership agreement with the Alliance and are only licensed for use in Applications from members of the Alliance. www.opendesign.com.

Note that you cannot redistribute a compiled version of the application, either as a standalone software or as part of a package, unless you have an adequate membership from the Open Design Alliance.

to:

The compiled application includes copyrighted software libraries from Open Design Alliance ("Aliance"). These libraries are subject to a membership agreement with the Alliance and are only licensed for use in Applications from members of the Alliance. www.opendesign.com.

You cannot redistribute the provided compiled version of the application, either as a standalone software or as part of a package, unless you have an adequate membership from the Open Design Alliance.

Please note that the source code is inspired in part on the mtext2text example given in the Open Design Alliance Toolkit.

Changed line 72 from:
to:
Thursday 17 November 2011, at 06:39 GMT+8 by 192.168.0.234 -
Thursday 17 November 2011, at 06:39 GMT+8 by 192.168.0.234 -
Added lines 1-4:

IMPORTANT:The compiled version of this tool is no-longer available as the OpenDesign Alliance, providing the library for accessing CAD data, requires the payment of a yearly fee, even for free (as in beer) software.
As per their requirement, I had to remove the compiled software from download.
I have left the source code here, but there is no longer any executable that contains any property from the OpenDesign Alliance.

Changed lines 43-45 from:

It is important to note that this utility relies on the OpenDesign Alliance OpenDWG Toolkit and Viewkit libraries. It is free to become a basic Associate Member, but you need to sign an agreement and you cannot redistribute the library or use them in commercial products. This is why there is a pre-compiled version of cad2svg included: you can use this free software, but to compile it yourself, you'll need to obtain the library from the OpenDesign Alliance.

The pre-compiled package is a static binary, so there is no pre-requisite requirements to use it.

to:

It is important to note that this utility relies on the OpenDesign Alliance OpenDWG Toolkit and Viewkit libraries.
It is no longer free (US$250 first time/US$100 yearly renewal fee) to become a basic Associate Member and you need to sign an agreement and you cannot redistribute the library or use them in commercial products. Because I cannot afford to pay the membership fee for providing a free tool, you will have to get your own membership and compile the software if you want to use it (see OpenDesign Alliance website for details).

Deleted line 46:

Do this only if you need to.

Changed line 49 from:
  • gcc (any version less than 2 year old should work and should already be installed on your machine, otherwise, apt-get? install gcc)
to:
  • gcc
Changed lines 68-73 from:

The compiled application includes copyrighted software libraries from Open Design Alliance ("Aliance"). These libraries are subject to a membership agreement with the Alliance and are only licensed for use in Applications from members of the Alliance. www.opendesign.com.

You cannot redistribute the provided compiled version of the application, either as a standalone software or as part of a package, unless you have an adequate membership from the Open Design Alliance.

Please note that the source code is inspired in part on the mtext2text example given in the Open Design Alliance Toolkit.

to:

The compiled application relies on copyrighted software libraries available from the Open Design Allianc. These libraries are subject to a membership agreement with the Alliance and are only licensed for use in Applications from members of the Alliance. www.opendesign.com.

Note that you cannot redistribute a compiled version of the application, either as a standalone software or as part of a package, unless you have an adequate membership from the Open Design Alliance.

Changed line 73 from:
to:
Thursday 02 December 2010, at 07:48 GMT+8 by 192.168.0.100 -
Changed lines 3-4 from:

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2, FC3). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

to:

This utility works and has been tested on Linux. It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

Changed lines 63-66 from:

This software is free to use and modify but can only be used in non-commercial application and must be redistributed along with its original and modified source code.

If you modify it and other could benefit from your change, then send me back your modifications so I can integrate them in the next version.

to:

The source code provided is free to use and modify. If you modify the source code and others could benefit from your change, then I require that you send me back your modifications so I can integrate them in the next version.

The compiled application includes copyrighted software libraries from Open Design Alliance ("Aliance"). These libraries are subject to a membership agreement with the Alliance and are only licensed for use in Applications from members of the Alliance. www.opendesign.com.

You cannot redistribute the provided compiled version of the application, either as a standalone software or as part of a package, unless you have an adequate membership from the Open Design Alliance.

Changed line 72 from:
to:
Thursday 11 January 2007, at 03:34 GMT+8 by Renaud -
Changed line 22 from:

=dosbatch [=

to:

(:source :)

Changed lines 29-30 from:

=]

to:

(:sourcend:)

Changed line 55 from:

=dosbatch [=

to:

(:source lang=Bash:)

Changed line 57 from:

=]

to:

(:sourcend:)

Changed line 59 from:

=dosbatch [=

to:

(:source lang=Bash:)

Changed line 61 from:

=]

to:

(:sourcend:)

Monday 04 July 2005, at 04:29 GMT+8 by testert -
Changed lines 72-74 from:
to:

(:comments:)

Sunday 15 May 2005, at 12:32 GMT+8 by Renaud -
Changed lines 3-4 from:

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2, FC3). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

to:

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2, FC3). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

Thursday 31 March 2005, at 10:55 GMT+8 by Renaud -
Changed line 3 from:

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

to:

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2, FC3). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

Monday 26 July 2004, at 09:27 GMT+8 by Renaud -
Changed lines 16-17 from:
  • AutoCAD special character escape sequences are not interpreted, so you may need to take care of thoise separately in multiline text (for isntance \P indicates a newline escape sequence.
  • The current converter only works on files created from AutoCAD version prior to Release 2002.
to:
  • AutoCAD special character escape sequences are not interpreted, so you may need to take care of those separately in multiline text (for isntance \P indicates a newline escape sequence.
Monday 12 July 2004, at 11:33 GMT+8 by Renaud -
Changed line 71 from:
to:
Monday 12 July 2004, at 11:24 GMT+8 by Renaud -
Added line 19:
Changed line 71 from:
to:
Monday 12 July 2004, at 11:22 GMT+8 by Renaud -
Changed lines 1-72 from:

Describe {{Cad2text}} here.

to:

cad2text is a simple Linux command-line utility that automatically reads http://en.wikipedia.org/wiki/Autocad AutoCAD files (both dwg and dxf) and extract text strings and their drawing co-ordinates.

This utility works and has been tested on Linux (RedHat 8, 9 and FC1, FC2). It should work on most x86 Linux distribution without change, and it would certainly not take too much to adapt it to Windows.

Capabilities

Since this is a command-line utility, it is perfect for batch jobs.

Capabilities:

  • Prints on standard output a tab-separated list of 4 columns containing: the text string found and its x, y and z location in the drawing coordinate system.
  • Works with both simple text and mtext strings.
  • Supplied binary does not depend on installed libraries
  • Indicative performance (no formal tests were performed): it took 2.2s to convert a 5.1MB dxf file into the compressed SVG file in the example below on an Athlon XP 1900 with 1GB of RAM.

Limitations

Before you decide if this utility is right for you, note the following limitiations:

  • strings are output as they are stored in the AutoCAD file. It's up to you to interpret the codepage used if it is different from standard latin.
  • AutoCAD special character escape sequences are not interpreted, so you may need to take care of thoise separately in multiline text (for isntance \P indicates a newline escape sequence.
  • The current converter only works on files created from AutoCAD version prior to Release 2002.
  • Some software sometimes explodes text into graphic line segments in DXF files. For those files, it may look as if there is text in the drawing, but there is in fact nothing meaningful that can be extracted (your would need some sort of http://en.wikipedia.org/wiki/Optical_character_recognition OCR for that).

Please bear in mind that this utility may not be suitable for jobs that require highly accurate information. Do not depend on its output to be accurate enough to replace the original drawing in a decision process!

Example

Below is a sample output from the utility:

# ./cad2text drawing.dwg
<:vspace>
LCS\POPB\PCPB   91.5377   279.3607  0.0000
\PBOS           170.8706  422.7293  0.0000
\PBOS           170.8706  275.9461  0.0000
Terminal board  139.2123  412.8459  0.0000

Notice the \P escape sequence within strings that are to be interpreted as newlines.

Why?

This utility is part of a larger drawing management system that collects information from CAD files from our file servers and stores them in a database for easy search.

Being able to make arbitrary searches on drawing content is very useful.

Installation

The download package contains both a pre-compiled binary for Linux RedHat (that should work on any x86 Linux) and the source code.

It is important to note that this utility relies on the http://www.opendesign.com/ OpenDesign Alliance http://www.opendesign.com/downloads/guest.htm OpenDWG Toolkit and Viewkit libraries. It is free to become a basic http://www.opendesign.com/membership/join.htm Associate Member, but you need to sign an agreement and you cannot redistribute the library or use them in commercial products. This is why there is a pre-compiled version of cad2svg included: you can use this free software, but to compile it yourself, you'll need to obtain the library from the OpenDesign Alliance.

The pre-compiled package is a static binary, so there is no pre-requisite requirements to use it.

Compile

Do this only if you need to. Pre-requisites:

  • http://sources.redhat.com/binutils/ binutils (they should be already installed, otherwise, {{apt-get}} install binutils)
  • http://gcc.gnu.org/ gcc (any version less than 2 year old should work and should already be installed on your machine, otherwise, {{apt-get}} install gcc)
  • http://www.gzip.org/zlib/ zlib (it is usually pre-packaged for each linux distribution. For RedHat for instance, you need to install the zlib-devel-xxx.rpm package with {{apt-get}} install zlib-devel)

I know it's bad, but there is no makefile for this. Once you have the necessary librairies from the OpenDWG kits, untar the provided cad2svg source and copy the following OpenDWG Linux files in your cad2svg directory:

  • ad2.a, ad2.h
  • ad3.a, ad3.h
  • adinit.a

We first need to transform the adinit.dat into an object file to be able to include it into our binary. This file contains initialisation code and data and must be included in your project for it to work:

objcopy -I binary -O elf32-i386 -B i386 adinit.dat adinit.a

Then just compile it all together:

gcc -Wall -o cad2text cad2text.c ad2.a ad3.a adinit.a -lm --static

License

This software is free to use and modify but can only be used in non-commercial application and must be redistributed along with its original and modified source code.

If you modify it and other could benefit from your change, then send me back your modifications so I can integrate them in the next version.

Please note that the source code is inspired in part on the mtext2text example given in the Open Design Alliance Toolkit.

Download

See also

  • {{cad2svg}}
Edit Page - Page History - Printable View - Recent Changes - WikiHelp - Search - RSS -
Page last modified on Wednesday 15 May 2013, at 01:23 GMT+8 - Viewed 3781 times