-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new_xdata() and set_xdata() accept tuples as tags
- Loading branch information
Manfred Moitzi
committed
Oct 22, 2016
1 parent
bd2a229
commit 92280e5
Showing
5 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import ezdxf | ||
|
||
dwg = ezdxf.new('AC1027') | ||
dwg.appids.new('PE_URL') # create APP ID entry | ||
ms = dwg.modelspace() | ||
|
||
c = ms.add_circle((10, 10), 100) | ||
c.tags.new_xdata('PE_URL', | ||
[ | ||
(1000, 'tralivali.ru'), | ||
(1002, '{'), | ||
(1000, 'tralivali'), | ||
(1002, '{'), | ||
(1071, 1), | ||
(1002, '}'), | ||
(1002, '}') | ||
]) | ||
dwg.saveas('xdata.dxf') | ||
|
||
## Error message: | ||
## Premature end of object | ||
## invalid or incomplete DXF input -- drawing discarded. | ||
## Press ENTER to continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters