span8
SPAN4.
文本功能或标签可以在不同格式之间翻译时令人棘手,特别是如果您想尝试使用字体,大小,弯曲单词和段落结构等一些更丰富的格式化。在本文中,我们将查看FME如何处理AutoCAD文本功能并探索一些实际单词示例。如果您发现您的标签正在变得无法管理,或者您想尝试不同的方法,可能值得检查MapTextLabeller plugin,你可以尝试自由。
It is important to note that when inspecting AutoCAD data with the FME Data Inspector it will almost always look different to how it is displayed in your Autodesk application (especially text). As with all DWG transformations, it is strongly recommended that you view and verify any output DWG files with an applicable Autodesk application. Don't have one? you can use Autodesk's fantastic free online360 Viewer。
T.his article will look atAutoCAD entitiesof type:autocad_text.和autocad_multi_text.。
如果您熟悉AutoCAD,则可能会知道有两个主要选项可用于在DWG中创建文本功能:
MTEXT和文本功能或实体在AutoCAD 2017中显示:E.ach simple text feature can only contain a single line whereas the MText feature includes all three lines.
文本是简单的单行文本功能,只需几个属性。我们可以在AutoCAD中的简单文本等有几件事,如移动,缩放,旋转和拉伸我们的单词,但是,我们在风格方面有些有限,每一行文本都成为一个新功能。简单的文本不会用于编写更大的文本块。
MText.特性提供额外的功能,他们可以反对tain multiple lines of text and they have the ability to contain several different fonts and styles within the same feature. In AutoCAD, MText features behave how you would expect typical word processors to behave.
好的,我们覆盖了AutoCAD,现在让我们看看FME如何代表这些不同的功能。
DWG文件的所有文本功能都按点几何(包括MText)地理位置。这一点由文本插入点决定。在从DWG读取文本功能时,将复制和转换为FME格式属性,如大小(高度),旋转和字符串内容等最流行的文本属性。这些FME属性是FME数据检测器用于可视化功能的内容。
笔记:T.这里are a number of AutoCAD specific format attributes which arenotrecognised by the FME Data Inspector and is the reason why your DWG might look different in FME and AutoCAD. These attributes can be identified by the ‘autocad_’ prefix and can be found in the Format Attribute window on the right-hand side of the FME Data Inspector. Each of the attributes can be modified with FME but will only be recognised by the AutoCAD writers. For more about AutoCAD format attributes这里。
FME数据检查器未识别的一些有趣的AutoCAD特定文本属性,但仍然可以修改包括:
有关适用于文本功能的全部AutoCAD特定格式属性列表,请查看帮助文档这里
在我们开始MText之前,让我们来看看FME工作台中的一个简单的文本示例。让我们将一些道路(归属线特征)从地理数据库转换为DWG文件,并尝试将一些属性表示在我们的输出DWG中的简单标签,并查看会发生什么。
1.下载和打开example1.fmwt.:
E.xample 1reads in the Roads feature type from our geodatabase, uses the Labeller to create two line labels from StreetId and StreetName. It uses an AttributeManager to create and set the ‘autocad_oblique’ attribute and then finally writes out the roads and labels into a single Roads layer in our output DWG. Inspectors are placed just prior to the writer. Run the workspace and wait for the FME Data Inspector to load up. Zoom into one of the road labels and you will notice that the labels are displayed as two lines of text that are stored as a single text feature.
2. Run the workspace and wait for the FME Data Inspector to load up. Zoom into one of the road labels and you will notice that the labels are displayed as two lines of text that are stored as a single text feature.
3.看看由ACAD作家写完后发生的功能发生了什么:找到了Output.dwg文件并在AutoCAD中打开它。您会注意到,两行文本已被分开并写为两个单独的文本实体。我们还可以验证文本现在也倾斜。
Output.dwg在AutoCAD 2017中看到:从我们的标签中的每条文本行都已转换为单个简单的文本实体,我们可以验证文本特征也倾向于设置为15倍。AttributeManager。
OK now we’re getting into the more challenging stuff. We’ve looked at simple text, so what about MText?
mtext(或多文本)是一个AutoCAD实体(类型:autocad_multi_text.)可以处理比简单的AutoCAD_TEXT实体更丰富的格式化。格式化选项包括具有多行,多个字体,文本包装和子弹点的功能,全部在一个特征中。FME可以读写AutoCAD MText功能,但是与大多数AutoCAD实体一样,使用FME数据检测器查看此类功能的外观将不同。
当将DWG读取器添加到工作空间(甚至在FME数据检查器中查看功能)时,检查读取器参数始终是重要的,在使用MTEXT实体时尤其如此。在使用FME读取MText实体时,用户可以选择将其MText功能爆炸到单个文本实体中(类似于覆盖的爆炸块本文),或将MText功能保持为一个。
此选项可以在实体选项部分中的读取器参数中找到(见下文)。选择爆炸MTEXT实体将分开每个文本行中的每个文本中的每个文本实体(这是默认值)。如果要将MTEXT保留为单个实体,请务必取消选中此框。
READWG READER默认参数:注意爆炸MTEXT实体is selected by default.
当读入FME的未爆炸的MText特征时,它与简单的文本特征类似地处理,但是,为了保留更丰富的格式化,创建了附加格式属性。最重要的是autocad_mtext_string。此格式属性携带格式化AutoCAD使用的代码。T.his is important if you are writing out to AutoCAD DWG, which we’ll see in an example below.
在FME数据检查器中使用多行检查未爆炸的MText功能时,您可能会注意到它被读为单行,而在AutoCAD中,它将读取为几个。这是因为文本被包裹在AutoCAD中。在格式属性中保留包装宽度autocad_mtext_ref_rect_width。Check out the FME help for more info onMText.specific format attributes。
当FME爆炸MText功能时,它将成为一组单独的autocad_text.所有分享相同的功能autocad_entity_handle.格式属性。如果要编辑某些部件,然后将它们聚合在一起,则这是方便的。
FME数据检查器中的爆炸vs未爆炸的mtext:T.he green text has been exploded by the reader and each of the three lines from the MText entity are now treated as three individual features. The blue MText on the right is unexploded, note that we only see one line here (in AutoCAD is appears as three).
所以现在我们知道如何从DWG文件中引入MText功能,但您可能会询问“如何使用FME创建Cool MText功能?”
创建mtext功能的最简单方法是dwgstyler变压器。示例2显示了具有基本工作空间的信息。示例2对示例1执行类似的变换,但是,这次我们的文本将被写为MTEXT实体。
例2:T.他与例子非常相似,但是,我们已经刷掉了atthatutemanager的dwgstyler
dwgstyler参数:A simple example of how to create MText features. In this example I have left the Text Size, Rotation and Text fields empty because the Labeller has already done this part for us. All we want the DWGStyler to do in this case is prepare the features so that the writer knows to save them as MText.
autocad_attach_point(编码:utf-8)autocad_middle_center autocad_entity(编码:utf-8)autocad_multi_text autocad_mtext_string(编码:utf-8){\ ftimes new roman | b0 | i0; pendrell stid:11418}
**IMPORTANT**请记住在AutoCAD中打开结果(output_mtext.dwg)以查看正确的表示。放大标签,您将看到每个都是一个居中的单一,两行MTEXT实体。在DWGStyler中设置了理由。有关理由退房的详细信息本文。
AutoCAD中的文本:在AutoCAD中看到的例子2的结果,以道路为中心的单个MTEXT实体。
介绍:AutoCAD工作流程亚搏在线|上一节:给出DWG某种风格:使用DWGStyler,模板文件,块等|下一篇:使用AutoCAD布局
©2020 S亚搏在线afe Software Inc |Legal