翻譯|使用教程|編輯:李顯亮|2020-05-19 09:30:07.257|閱讀 349 次
概述:在小編看來(lái),CADEditorX是一款非常簡(jiǎn)單且實(shí)用的CAD文檔查看與編輯器。對(duì)于使用小白可能還比較陌生,現(xiàn)在小編為大家整理了一篇《ActiveX從零開始系列操作教程》,從查看到編輯,以及其他功能的使用,供大家學(xué)習(xí)。本文將講解如何添加圖片以及框中的文本。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
CADEditorX是一個(gè)ActiveX組件,用于在支持ActiveX和COM技術(shù)的任何開發(fā)環(huán)境中,將CAD功能添加到網(wǎng)頁(yè)或正在開發(fā)的應(yīng)用程序中。同時(shí)可以查看、編輯、轉(zhuǎn)換、打印和測(cè)量DWG、DXF、SVG、HPGL、PDF、STEP、IGES、STL和其他CAD文件。
在小編看來(lái),CADEditorX是一款非常簡(jiǎn)單且實(shí)用的CAD文檔查看與編輯器。對(duì)于使用小白可能還比較陌生,現(xiàn)在小編為大家整理了一篇《CADEditorX從零開始系列操作教程》,從查看到編輯,以及其他功能的使用,供大家學(xué)習(xí)。
圖片存儲(chǔ)在cstImageEnt類中。請(qǐng)根據(jù)下面的例子來(lái)添加圖片。
<?xml version="1.0" encoding="UTF-8"?>
<cadsofttools version="2.0">
<!-- Add entities -->
<add>
<cstSectionObjects Name="OBJECTS">
<SubEntities>
<cstDictionary name="IMAGEDEFS">
<SubEntities>
<!-- FileName="Specify the file path" -->
<cstImageDef FileName="%SGSAMPLESPATH%\image.jpg" HandleSave="@1"/>
</SubEntities>
</cstDictionary>
</SubEntities>
</cstSectionObjects>
<!-- Point - insertion point (corresponds to the bottom left corner of the image) -->
<!-- Point1 - top left corner in the drawing coordinates (top left corner of the image) -->
<!-- Point2 - bottom right corner in the drawing coordinates (bottom right corner of the image) -->
<cstImageEnt Point="0,0,0" imagedef="@1">
<Calc mode="0" Point1="0,100,0" Point2="100,0,0"/>
</cstImageEnt>
<cstImageEnt Point="0,0,0" imagedef="@1">
<Calc mode="1" Width="100" Height="400" Angle="30"/>
</cstImageEnt>
</add>
<fittosize />
</cadsofttools>
有時(shí)需要用文本標(biāo)記圖形。接下來(lái)讓我們看看如何在框中創(chuàng)建文本:
下面的代碼示例創(chuàng)建一個(gè)矩形,在其中填充陰影并添加文本。
<?xml version="1.0" encoding="UTF-8"?> <!-- Description: Example show how to create text in a box and how to use list of handles. --> <cadsofttools version="2.0"> <!-- Create simple rectangular Solid Hatch. Handle of polyline is saved as "@1" --> <add> <cstLWPolyline HandleSave="@1"> <SubEntities> <cstVertex Point="0,0,0"/> <cstVertex Point="2,0,0"/> <cstVertex Point="2,1,0"/> <cstVertex Point="0,1,0"/> <cstVertex Point="0,0,0"/> </SubEntities> </cstLWPolyline> </add> <!-- Select polyline --> <Select Handle="@1"/> <!-- Create hatch --> <createhatch/> <!-- Set red color, it's index is 1 --> <apply Color="0;1;"/> <add> <!-- Create text in box --> <cstMText Point="0.2,0.6" Height="0.2" TextValue="Text in a box" HandleSave="@2"/> </add> <ShowSelectedEntities/> <!-- Handles can be accepted as a list with ";" separator --> <UnSelect Handle="@1;@2;$24"/> </cadsofttools>
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@ke049m.cn