CN104574451A - Method and device for character replacing by graph in AutoCAD - Google Patents

Method and device for character replacing by graph in AutoCAD Download PDF

Info

Publication number
CN104574451A
CN104574451A CN201510014198.3A CN201510014198A CN104574451A CN 104574451 A CN104574451 A CN 104574451A CN 201510014198 A CN201510014198 A CN 201510014198A CN 104574451 A CN104574451 A CN 104574451A
Authority
CN
China
Prior art keywords
word
matching table
character
font
contour pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510014198.3A
Other languages
Chinese (zh)
Inventor
徐凌飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
QINGYI PRECISION MASKMAKING (SHENZHEN) CO Ltd
Original Assignee
QINGYI PRECISION MASKMAKING (SHENZHEN) CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by QINGYI PRECISION MASKMAKING (SHENZHEN) CO Ltd filed Critical QINGYI PRECISION MASKMAKING (SHENZHEN) CO Ltd
Priority to CN201510014198.3A priority Critical patent/CN104574451A/en
Publication of CN104574451A publication Critical patent/CN104574451A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention belongs to the technical field of photoetching machine graphs and provides a method and device for character replacing by a graph in AutoCAD. First, according to a word stock, a plurality of typeface matching tables are established; the typeface matching tables correspond to typefaces in the word stock in a one-to-one mode, and each element in the typeface matching tables comprises characters and contour graphs corresponding to the characters in the typefaces; then files to be converted are obtained; the typeface matching tables corresponding to the characters in the files are obtained; and finally the characterized in the files are replaced by the contour graphs corresponding to the characters in the typeface matching tables. According to the method and device for character replacing by the graph in AutoCAD, the efficiency of character replacing by the graph in AutoCAD is improved.

Description

The method of figure Alternate text and device in a kind of AutoCAD
Technical field
The present invention relates to litho machine graphics art, particularly the method for figure Alternate text and device in a kind of AutoCAD.
Background technology
Electron trade is to CAM (the computer Aided Manufacturing of design configuration, computer-aided manufacturing) process in, AutoCAD treats as an entity using word the use of word, and graph data is when arriving litho machine and producing, switching software can only identify multi-section-line (solid polymer composite of connected segmental arc and line segment composition) entity and circle, and therefore in CAM process, the process of word needs to convert contour pattern to.It generates is that wmfout and wmfin two orders interactively realize, and exports wmf formatted file, then imports this wmf file, thus reach transformation by copying screen mode.Therefore operate cumbersome, waste time and energy, exist text style distortion and cannot high speed processing batch word problem.
Summary of the invention
The invention provides method and the device of figure Alternate text in a kind of AutoCAD, improve the efficiency of figure Alternate text in AutoCAD.
On the one hand, the invention provides the method for figure Alternate text in a kind of AutoCAD, in described AutoCAD, the method for figure Alternate text comprises:
Several font matching table is set up according to character library; The font one_to_one corresponding of described font matching table and described character library, each element in described font matching table comprises word and contour pattern corresponding with described word in described font;
Obtain file to be converted;
Obtain the font matching table that word in described file is corresponding;
Word in described file is replaced with contour pattern corresponding with described word in described font matching table.
On the other hand, the invention provides the device of figure Alternate text in a kind of AutoCAD, in described AutoCAD, the device of figure Alternate text comprises:
Set up module, for setting up several font matching table according to character library; The font one_to_one corresponding of described font matching table and described character library, each element in described font matching table comprises word and contour pattern corresponding with described word in described font;
First acquisition module, for obtaining file to be converted;
Second acquisition module, for obtaining font matching table corresponding to word in described file;
Replacement module, for replacing with contour pattern corresponding with described word in described font matching table by the word in described file.
From the invention described above, owing to first setting up several font matching table according to character library; The font one_to_one corresponding of font matching table and character library, each element in font matching table comprises word and contour pattern corresponding with word in font; Then file to be converted is obtained; Obtain the font matching table that word in file is corresponding again; Finally the word in file is replaced with contour pattern corresponding with word in font matching table; This improves the efficiency of figure Alternate text in AutoCAD.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The realization flow figure of the method for figure Alternate text in a kind of AutoCAD that Fig. 1 provides for the embodiment of the present invention one;
The another kind of realization flow figure of the method for figure Alternate text in a kind of AutoCAD that Fig. 2 provides for the embodiment of the present invention one;
A kind of structural representation of the device of figure Alternate text in a kind of AutoCAD that Fig. 3 provides for the embodiment of the present invention two;
The another kind of structural representation of the device of figure Alternate text in a kind of AutoCAD that Fig. 4 provides for the embodiment of the present invention two;
In a kind of AutoCAD that Fig. 5 provides for the embodiment of the present invention two, the device of figure Alternate text sets up the structural representation of module;
Fig. 6 is the data structure of font matching table.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
embodiment one:
The method flow of figure Alternate text in a kind of AutoCAD that the embodiment of the present invention one provides, comprises see the method for figure Alternate text in Fig. 1, AutoCAD:
101. set up several font matching table according to character library; The font one_to_one corresponding of font matching table and character library, each element in font matching table comprises word and contour pattern corresponding with word in font.
Each element in font matching table comprises word and the contour pattern corresponding with word is specially in font: each element in font matching table comprises word and the coordinate data of contour pattern corresponding with word in font.
Such as, the data structure of font matching table as shown in Figure 6.
" 21 00 00 00 " for character "! " ASCII character 33;
" 1A 00 00 00 " for character "! " in font matching table, need the data length used, be 1 unit with 4 bytes, comprise 1 unit character "! ", the notebook data of 1 unit, the coordinate data of contour pattern is some; the contour pattern ED of some groups of 2 units mark, namely has a 16 system 1A unit data, equal 26 unit datas of 10 systems in this example; stored in real bytes length be 26x4=104, equal 68 in 16 systems;
Character "! " contour pattern is made up of 2 figures, " 7B 77 8B 3E " to " 75 3C 47 3F " expression "! " the first half of contour pattern; i.e. the coordinate figure of the coordinate data string of the 1st figure; be (0.27239594; 0.77826625), (0.23689373; 0.24831672), (0.15780549,0.24831672), (0.12030316,0.77826625), (0.12030316; 1.00003004), (0.27239594,1.00003004);
" F0 23 74 49 F0 23 74 49 " is that the coordinate data string of the 1st figure terminates mark;
" 8A A6 88 3E " to " 14 3E 57 38 " be "! " the latter half; i.e. the coordinate figure of the coordinate data string of the 2nd figure; be (0.26689559; 0.00005132), (0.12580350; 0.00005132), (0.12580350; 0.13980998), (0.26689559,0.13980998);
" F0 23 74 49 F0 23 74 49 " is that the coordinate data string of the 2nd figure terminates mark.
102. obtain file to be converted.
Obtain file to be converted to be specially: the file obtaining AutoCAD to be converted.
The font matching table that word in 103. acquisition files is corresponding.
Word in file is replaced with contour pattern corresponding with word in font matching table by 104-1..In concrete enforcement, one by one the word in file can be replaced with contour pattern corresponding with word in font matching table, thus complete the conversion of batch.
Optionally, as shown in Figure 2, after step 103, also step 104-2 is comprised:
If there is no the word in file in 104-2. font matching table, then by the text conversion in file for treating additional contour pattern, and by the word in file and treat that additional contour pattern adds in font matching table.
By the text conversion in file for treating additional contour pattern, and by the word in file with treat that additional contour pattern adds in font matching table and be specially: setting needs the font of conversion, put to full frame maximum to word, WMFOUT is adopted to export as WMF image file, WMFIN is adopted to import in current file by the WMF image file just exported, realize the contoured of word, adjustment WMF image overlaps with original text word to default multiplying power and position to make it, delete word, arrange the figure optimizing WMF image, the figure arranging the WMF image after optimizing is treats additional figure, get and treat additional figure coordinate data and exported in font matching table.
Step 101 is specially: the title of character library in read list file, character library is converted to the font matching table corresponding with character library one by one according to the order of the title of character library.
In concrete enforcement, the name list of character library can be put in and name in text arbitrarily, suffix is .txt, and then character library is converted to font matching table by automatic batch.
Step 101 comprises following concrete steps:
A. when the word in character library is ASCII character, setting up ASCII character word according to ASCII character, is contour pattern by ASCII character text conversion, then ASCII character word and contour pattern corresponding to ASCII character word is stored in font matching table.
B. when the word in character library is Chinese character, Chinese character is converted to contour pattern, then Chinese character and contour pattern corresponding to Chinese character are stored in font matching table.
In concrete enforcement, when changing English character library, because only have ASCII character word, so only perform steps A, integers all between 33 to 127 is set to respectively by ASCII character, setting up ASCII character word according to ASCII character, is contour pattern by ASCII character text conversion, then is stored in font matching table by ASCII character word and contour pattern corresponding to ASCII character word; In the transfer during literal pool, because also have Chinese character, so steps A and step B need be performed except ASCII character word.
First the present embodiment by setting up several font matching table according to character library; The font one_to_one corresponding of font matching table and character library, each element in font matching table comprises word and contour pattern corresponding with word in font; Then file to be converted is obtained; Obtain the font matching table that word in file is corresponding again; Finally the word in file is replaced with contour pattern corresponding with word in font matching table; This improves the efficiency of figure Alternate text in AutoCAD.
embodiment two:
The device of figure Alternate text in a kind of AutoCAD that the embodiment of the present invention two provides, comprises see the device 30 of figure Alternate text in Fig. 3, AutoCAD and sets up module 310, first acquisition module 320, second acquisition module 330 and replacement module 340.
Set up module 310, for setting up several font matching table according to character library; The font one_to_one corresponding of font matching table and character library, each element in font matching table comprises word and contour pattern corresponding with word in font;
First acquisition module 320, for obtaining file to be converted;
Second acquisition module 330, for obtaining font matching table corresponding to word in file;
Replacement module 340, for replacing with contour pattern corresponding with word in font matching table by the word in file.
In addition, in an alternative embodiment of the invention, as shown in Figure 4, in a kind of AutoCAD, the device 40 of figure Alternate text also comprises interpolation module 350.
Add module 350, if for there is no the word in file in font matching table, then by the text conversion in file for treating additional contour pattern, and by the word in file and treat that additional contour pattern adds in font matching table.
Wherein, as shown in Figure 5, set up module 310 and comprise the first storage unit 311 and the second storage unit 312.
First storage unit 311, for when the word in character library is ASCII character, setting up ASCII character word according to ASCII character, is contour pattern by ASCII character text conversion, then ASCII character word and contour pattern corresponding to ASCII character word is stored in font matching table.
Second storage unit 312, for when the word in character library is Chinese character, is converted to contour pattern by Chinese character, then Chinese character and contour pattern corresponding to Chinese character is stored in font matching table.
In concrete enforcement, set up module 310 and set up several font matching table according to character library and be specially: the title of character library in read list file, is converted to the font matching table corresponding with character library one by one according to the order of the title of character library by character library.
First the present embodiment by setting up several font matching table according to character library; The font one_to_one corresponding of font matching table and character library, each element in font matching table comprises word and contour pattern corresponding with word in font; Then file to be converted is obtained; Obtain the font matching table that word in file is corresponding again; Finally the word in file is replaced with contour pattern corresponding with word in font matching table; This improves the efficiency of figure Alternate text in AutoCAD.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the method for figure Alternate text in AutoCAD, it is characterized in that, in described AutoCAD, the method for figure Alternate text comprises the following steps:
Several font matching table is set up according to character library; The font one_to_one corresponding of described font matching table and described character library, each element in described font matching table comprises word and contour pattern corresponding with described word in described font;
Obtain file to be converted;
Obtain the font matching table that word in described file is corresponding;
Word in described file is replaced with contour pattern corresponding with described word in described font matching table.
2. the method for figure Alternate text in AutoCAD according to claim 1, is characterized in that, further comprising the steps of after the step obtaining font matching table corresponding to the word in described file:
If there is no the word in described file in described font matching table, then by the text conversion in described file for treating additional contour pattern, and by the word in described file with describedly treat that additional contour pattern adds in described font matching table.
3. the method for figure Alternate text in AutoCAD according to claim 1, is characterized in that, the described step setting up several font matching table according to character library is specially:
The title of character library in read list file, is converted to the font matching table corresponding with described character library by described character library one by one according to the order of the title of character library.
4. the method for figure Alternate text in AutoCAD according to claim 1, is characterized in that, described to set up the step of several font matching table according to character library further comprising the steps of:
When the word in character library is ASCII character, ASCII character word is set up according to described ASCII character, be described contour pattern by described ASCII character text conversion, more described ASCII character word and contour pattern corresponding to described ASCII character word are stored in described font matching table;
When the word in character library is Chinese character, described Chinese character is converted to described contour pattern, more described Chinese character and contour pattern corresponding to described Chinese character are stored in described font matching table.
5. the method for figure Alternate text in AutoCAD according to claim 1, it is characterized in that, each element in described font matching table comprises word and the contour pattern corresponding with described word is specially in described font: each element in described font matching table comprises the coordinate data of word and contour pattern corresponding with described word in described font.
6. the device of figure Alternate text in AutoCAD, it is characterized in that, in described AutoCAD, the device of figure Alternate text comprises:
Set up module, for setting up several font matching table according to character library; The font one_to_one corresponding of described font matching table and described character library, each element in described font matching table comprises word and contour pattern corresponding with described word in described font;
First acquisition module, for obtaining file to be converted;
Second acquisition module, for obtaining font matching table corresponding to word in described file;
Replacement module, for replacing with contour pattern corresponding with described word in described font matching table by the word in described file.
7. the device of figure Alternate text in AutoCAD according to claim 6, is characterized in that, also comprise:
Add module, if for there is no the word in described file in described font matching table, then by the text conversion in described file for treating additional contour pattern, and by the word in described file with describedly treat that additional contour pattern adds in described font matching table.
8. the device of figure Alternate text in AutoCAD according to claim 6, is characterized in that, described module of setting up is set up several font matching table according to character library and is specially:
The title of character library in read list file, is converted to the font matching table corresponding with described character library by described character library one by one according to the order of the title of character library.
9. the device of figure Alternate text in AutoCAD according to claim 6, it is characterized in that, described module of setting up comprises:
First storage unit, for when the word in character library is ASCII character, ASCII character word is set up according to described ASCII character, be described contour pattern by described ASCII character text conversion, more described ASCII character word and contour pattern corresponding to described ASCII character word are stored in described font matching table;
Second storage unit, for when the word in character library is Chinese character, is converted to described contour pattern by described Chinese character, more described Chinese character and contour pattern corresponding to described Chinese character is stored in described font matching table.
10. the device of figure Alternate text in AutoCAD according to claim 6, it is characterized in that, each element in described font matching table comprises word and the contour pattern corresponding with described word is specially in described font: each element in described font matching table comprises the coordinate data of word and contour pattern corresponding with described word in described font.
CN201510014198.3A 2015-01-12 2015-01-12 Method and device for character replacing by graph in AutoCAD Pending CN104574451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510014198.3A CN104574451A (en) 2015-01-12 2015-01-12 Method and device for character replacing by graph in AutoCAD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510014198.3A CN104574451A (en) 2015-01-12 2015-01-12 Method and device for character replacing by graph in AutoCAD

Publications (1)

Publication Number Publication Date
CN104574451A true CN104574451A (en) 2015-04-29

Family

ID=53090418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510014198.3A Pending CN104574451A (en) 2015-01-12 2015-01-12 Method and device for character replacing by graph in AutoCAD

Country Status (1)

Country Link
CN (1) CN104574451A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308345A (en) * 2017-07-26 2019-02-05 珠海金山办公软件有限公司 A kind of character displaying method, device, electronic equipment and storage medium
CN113505569A (en) * 2021-06-07 2021-10-15 深圳市华阳国际工程设计股份有限公司 DWG drawing font adapting method and device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000082151A (en) * 1998-09-07 2000-03-21 Fuji Xerox Co Ltd Method for analyzing design sample and device therefor and method for evaluating design and device therefor
CN1448870A (en) * 2003-05-14 2003-10-15 西安交通大学 Computer-aided technique planning method for silicon micro-component
US6978410B1 (en) * 1999-09-25 2005-12-20 Advantest Corp. Test language conversion method
CN1716262A (en) * 2004-07-02 2006-01-04 赖维祥 Three dimension text quick design and producing method
CN1906635A (en) * 2003-11-28 2007-01-31 约翰·艾米克 System and method for digitizing a pattern

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000082151A (en) * 1998-09-07 2000-03-21 Fuji Xerox Co Ltd Method for analyzing design sample and device therefor and method for evaluating design and device therefor
US6978410B1 (en) * 1999-09-25 2005-12-20 Advantest Corp. Test language conversion method
CN1448870A (en) * 2003-05-14 2003-10-15 西安交通大学 Computer-aided technique planning method for silicon micro-component
CN1906635A (en) * 2003-11-28 2007-01-31 约翰·艾米克 System and method for digitizing a pattern
CN1716262A (en) * 2004-07-02 2006-01-04 赖维祥 Three dimension text quick design and producing method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
柳玲等: "CAD文件转换为SVG文件的探讨", 《计算机应用》 *
王光建等: "写字机器人的文字矢量化及应用", 《现代制造工程》 *
钟辉: "一种在AutoCAD中调用矢量汉字的新方法", 《沈阳建筑工程学院学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109308345A (en) * 2017-07-26 2019-02-05 珠海金山办公软件有限公司 A kind of character displaying method, device, electronic equipment and storage medium
CN113505569A (en) * 2021-06-07 2021-10-15 深圳市华阳国际工程设计股份有限公司 DWG drawing font adapting method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102841901B (en) A kind of method and apparatus of web displaying
CN104021123A (en) Method and system for data transfer
CN106598922A (en) Character string conversion method and system
CN104156341A (en) Online reading system and method
CN107491471B (en) Spark-based large-scale astronomical data sky coverage generation method
CN109117032A (en) Reading processing method and device based on epub e-book
CN104391748A (en) Mapreduce computation process optimization method
CN102955816B (en) String matching is utilized to carry out the method and system of data syn-chronization
CN113569508B (en) Database model construction method and device for data indexing and access based on ID
CN104574451A (en) Method and device for character replacing by graph in AutoCAD
CN103699555A (en) Multisource data real-time database data generation method applicable to scheduling and transformer substation integrated system
CN104765910A (en) Multiple-loop branch line selection, ranking interaction, scene modeling system and method
CN102023978B (en) Mass data processing method and system
CN104881310A (en) Method and device for configuring embedded system
CN101553779A (en) Migration apparatus which convert application program of mainframe system into application program of open system and method for thereof
CN101710322A (en) Method and system for associating information
EP3963853B1 (en) Optimizing storage and retrieval of compressed data
CN101526925B (en) Processing method of caching data and data storage system
CN102880690A (en) Method for simplifying character library of electronic book, and processing device for electronic book
CN104573229A (en) Interface module for automatically introducing three-dimensional design data into process system and working method
CN102508690B (en) Storing method and decoding method for command line of embedded equipment
CN107239436A (en) A kind of data transfer device and device
CN104536947A (en) Layout document processing method and device
CN106791855A (en) A kind of method and system for reducing management system cost of attending a banquet
CN106406560A (en) Method and system for outputting vector fonts of mechanical engineering characters in desktop operation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150429