How to read dwg file in dwgadd command. #981
Unanswered
okuyamashin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
What I want to do is add dimension lines to the appropriate locations in an existing DWG file.
On Amazon Web Services, I create an instance of Ubuntu 24.04 and run the following commands:
apt update
apt upgrade
apt install git autoconf libtool swig python3-dev texinfo build-essential gcc
cpan install Convert::Binary::C
Then, I run:
git clone https://github.com/LibreDWG/libredwg.git
sh autogen.sh
./configure --enable-trace
make
make install
make check
At the end of the check process, I get the message undefined symbol: dwg_setup_ENDBLK. Is this expected?
Even so, commands like dwgread, dwgwrite, and dwgadd seem to work. There is an example script: ./example/dwgadd.example.
When I run:
dwgadd -o hello.dwg dwgadd.example
I receive some warnings, but it completes successfully. However, when I open the created hello.dwg file in AutoCAD, nothing is displayed.
But if I run a command like:
dimension_aligned (10 10 0) (20 20 0) (15 25 0)
to create a DWG file and then convert it to JSON using dwgread, I can confirm that the dimension lines have been added.
However, if I include the line:
readdxf "sample.dwg"
at the beginning, I get the error:
ERROR: readdxf seen, but DWG already exists
and no DWG file is created.
Where did I go wrong?
Additional Information:
By adding apt install libffi-dev ibmpc-dev, the Perl errors during make check no longer appear.
However, it seems that SWIG is failing, and I am unable to import libredwg in Python.
Beta Was this translation helpful? Give feedback.
All reactions