[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
CADSoftTools.com • View topic - How to save changed attributes to a dwg?

How to save changed attributes to a dwg?

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: admin, support, SDS

How to save changed attributes to a dwg?

Postby Quedlin » 20 Feb 2017, 18:35

Hello,

this is what I want to do:
I want to open a dwg file, read all the blocks with attributes and show them in a string grid.
Then I want to manually change some values and save the changes to the dwg file.

What I did already:
I have build a form with 3 buttons: "Open and read", "Change attribute", "Save to file" an a string grid for showing the vales of the attributes.
I can open a file and read the all the blocks and attributes.

But how can I save the changes back to the dwg file?

This is how my formular looks like: (http://www.fotos-hochladen.net/view/test5n2ftq8m7l.png)
Image

I am not a professional sofware programmer, so I'm sorry for asking such simple things.

I watched the demo of "DXFExporter", but there was only an example of saving a canvas to a dxf file.

Thank you for your help!
Quedlin
 
Posts: 2
Joined: 20 Feb 2017, 18:07

Re: How to save changed attributes to a dwg?

Postby support » 21 Feb 2017, 21:19

Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36

Re: How to save changed attributes to a dwg?

Postby Quedlin » 24 Feb 2017, 14:10

Quedlin
 
Posts: 2
Joined: 20 Feb 2017, 18:07

Re: How to save changed attributes to a dwg?

Postby support » 24 Feb 2017, 15:45

Hello,

The problem is that your code reads attributes (TsgDXFAttrib) from the block references (TsgDXFInsert), while my routine changes the attribute definitions (TsgDXFAttdef) in the block definition (TsgDXFBlock). You said that you want to open a dwg file, read all the blocks with attributes and show them in a string grid, so I thought you are reading TsgDXFBlock objects.


Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
support
 
Posts: 2663
Joined: 30 Mar 2005, 08:36


Return to CAD VCL

Who is online

Users browsing this forum: No registered users and 5 guests