GE Smallworld开发(003dxf文件导入导出问题)
来源:互联网 发布:知乎海尔收购通用电器 编辑:程序博客网 时间:2024/06/05 10:13
001、没有为DXF单独建立SOC的问题
1、用create_dxf_dataset()带默认参数,会为dxf数据建立独立的soc,:dxf_soc_def;
2、自己设定create_dxf_dataset()参数,可以在:gis soc下建立dxf数据集;
create_dxf_dataset({"D:\gis_refinery\ds\ds_admin"},"D:\gis_refinery\ds\ds_dxf","dxf.ds",:dxf,:gis)
$
问题来了:
1、如果是采用第一种方法,则在classic界面下,用
g.activate_dxf_import_editor()激活dxf文件导入编辑器时,会出错,提示没有dxf数据集。
原因是,g.activate_dxf_import_editor()找的是gis soc下面的dxf数据集,默认情况下
gis soc下是没有dxf数据集,要自己建立。可以用create_dxf_dataset()带参数建立。
2、如果用第二种方法建立,在Applications界面,选择"DXF Import & Export",会打不开界面。
原因是,config.xml文件中(在swaf_dxf_application模块下),属性"dxf_soc_def_name"的值,被设置为"dxf_soc_def"。而在这种
情况下,根本就没有"dxf_soc_def"的soc定义。
解决办法是,将属性"dxf_soc_def_name"的值,设置为"gis",
然后
将方法dxf_mapping_plugin.post_init_plugins()中的形如以下的内容
##a_database.add_transaction_group( a_soc )注释,重新加载该方法即可。
002、dxf_mapping_plugin.post_init_plugins方法修改
_method dxf_mapping_plugin.post_init_plugins()
##
## Do final initialisation of this plugin according to
## properties set from XML.
##
## Adds a new transaction group based on the dxf_soc_def_name
## property.
##
## Creates dependencies between _self, the DXF database view
## (.dxf_dsview), the user object dataset view .user_dsview
##
a_database << _self.database
_if (soc_name << _self.dxf_soc_def_name ) _isnt _unset
_then
a_soc << gis_program_manager.spatial_object_controller( soc_name )
_if a_soc _is _unset _orif
a_soc.dataset_managers.empty?
_then
a_soc << gis_program_manager.open_datasets( soc_name )
_endif
# by zhaoyong modify on 2009-09-03
#注释以下语句
#a_database.add_transaction_group( a_soc )
#增加以下判断
_if soc_name _isnt :gis
_then
a_database.add_transaction_group( a_soc )
_endif
#end
_endif
.datasets_with_dxf << _self.register_datasets( _true )
.dxf_dsview << _self.dxf_dataset_view
_if .dxf_dsview _isnt _unset
_then
.dxf_dsview.add_dependent(_self)
_endif
_if a_database _isnt _unset
_then
a_database.add_dependent( _self, :mode, :view )
_endif
.user_dsview_list << rope.new()
# options for input transform
.options << hash_table.new()
# Create mapping application tables
.translation_tables << hash_table.new()
_if .dxf_dsview _isnt _unset
_then
# import mapping table
.translation_tables[:dxf!application] << .dxf_dsview.collections[:dxf!application]
.translation_tables[:dxf!layers] << .dxf_dsview.collections[:dxf!layers]
.translation_tables[:dxf!blocks] << .dxf_dsview.collections[:dxf!blocks]
.translation_tables[:dxf!line_translations] << .dxf_dsview.collections[:dxf!line_translations]
.translation_tables[:dxf!point_translations] << .dxf_dsview.collections[:dxf!point_translations]
.translation_tables[:dxf!text_translations] << .dxf_dsview.collections[:dxf!text_translations]
.translation_tables[:dxf!insert_translations] << .dxf_dsview.collections[:dxf!insert_translations]
.translation_tables[:dxf!dimension_translations] << .dxf_dsview.collections[:dxf!dimension_translations]
.translation_tables[:dxf!block_attr_translations] << .dxf_dsview.collections[:dxf!block_attr_translations]
# Export mapping table
.translation_tables[:dxf!output_application] << .dxf_dsview.collections[:dxf!output_application]
.translation_tables[:dxf!chain_out_translations] << .dxf_dsview.collections[:dxf!chain_out_translations]
.translation_tables[:dxf!area_out_translations] << .dxf_dsview.collections[:dxf!area_out_translations]
.translation_tables[:dxf!text_out_translations] << .dxf_dsview.collections[:dxf!text_out_translations]
.translation_tables[:dxf!point_out_translations] << .dxf_dsview.collections[:dxf!point_out_translations]
.translation_tables[:dxf!dimension_out_translations] << .dxf_dsview.collections[:dxf!dimension_out_translations]
.translation_applications << _self.input_app_list()
.output_translation_applications << _self.output_app_list()
_endif
# set app_id with Default input translation application.
_self.set_app_value(0)
# set app_id with Default output translation application.
_self.set_output_app_value(0)
# set the default dxf_file_id.
_self.set_dxf_file_id(0)
_endmethod
$
003、dxf导出问题
DXF文件导出问题
选择DXF文件导出时,当选择好导出区域后,对该区域内的Geometry的处理有三个选项
Clipped Overlapping Inside
默认为Inside,如果Geometry比较大,没有完全包含在选择区域内是,导出会终止。这时
可以选择Clipped选项。
004、config.xml配置文件
<!-- config.xml for the SWAF DXF Application -->
<config base="swaf_professional_application.config">
<plugins>
<plugin name="editor_manager" class_name="editor_manager" >
<properties>
<property name="configuration_file_name" value="swaf_dxf_application.collection_config" />
<property name="editor_gui_definition_module_name" value="swaf_professional_application"/>
<property name="editor_gui_definition_file_name" value="editor_gui.xml"/>
</properties>
</plugin>
<plugin name="dxf" class_name="dxf_mapping_plugin">
<properties>
<!--
<property name="dxf_soc_def_name" value="dxf_soc_def" />
-->
<property name="dxf_soc_def_name" value="gis" />
</properties>
</plugin>
</plugins>
</config>
- GE Smallworld开发(003dxf文件导入导出问题)
- GE Smallworld开发(002dxf文件导入)
- GE Smallworld开发(001建立数据库)
- GE SmallWorld开发(004加载SOMs)
- GE Smallworld开发(006坐标系统设置)
- GE SmallWorld开发(005加载make_image及用法)
- CAM350 导出DXF文件
- PROE导出DXF文件
- PADS导入DXF结构(样条曲线不能导入 多线段和并)导出DXF(堆叠)文件
- altium导入dxf、dxg文件
- Houdini导出DXF文件的方法
- ALLLEGRO中导入DXF文件步骤
- Allegro中如何导入DXF文件
- AltiumDesigner导入AutoCAD文件DXF,DWG格式
- Altium Designer 导入DXF文件[转载]
- PADS如何导出GERBER文件以及DXF文件
- 求PADS如何导出GERBER文件以及DXF文件?
- 20161016-Allegro16.6中将板框导出DXF文件
- WPF窗体最小化到任务栏
- 在java环境中添加flex页面(将各种错全部改正运行正确)
- 单件 singleton 唯一的对象实例
- loadrunner 多组脚本分别设置用户数
- 黑马程序员_java_String类
- GE Smallworld开发(003dxf文件导入导出问题)
- android中socket连接不到服务器导致卡机处理
- activity启动的两种方
- 你多少分的呢从vs苍南县变成现实
- 玩转Ubuntu----Ubuntu的安装
- manifest学习网站总汇
- 繁忙的生活
- Android开发之多媒体——显示手机存储的图片
- 关于socket阻塞与非阻塞情况下的recv、send、read、write返回值及用setsockopt()来控制recv()与send()的超时