在proe中,如何修改配置文件?

proe软件中,在形成工程图的时候,默认的系统放置视图是第三试图,我们习惯用的是第一视图,就是主,俯,左视图,如何改proe中的配置文件,改哪一个配置,使默认的是我们使用的第一视图。
知道的老师给个解答,不胜感激。

1、proe配置文件config可以放在此目录中才会生效

2、proe每次启动时,都会产生一个trail.txt文件,而这个文件不删除,积聚多了会影响速度,所以可以来此目录可以不定期删除trail文件。


查询proe起始位置(即proe启动目录)的方法:

1、找到proe启动图标,单击右键—【属性】

2、弹出【属性】对话框-【快捷方式】

温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-07-26
1. 引言
OpenWRT中采用LuCI作为它的Web interface界面框架,采用Lua语言。在本文中将以一个简单的示例详细描述如何自定义开发一个界面,对一个配置文件进行操作。
2.Model与Controler
MVC的设计理念是进行LuCI开发的一个关键
在LuCI中Controller的文件定义在固件中的/usr/lib/lua/luci/controller目录中,模版目录在/usr/lib/lua/luci/view目录下,而model则是在/usr/lib/lua/luci/model中。而model中有一个特殊的模块叫做CBI,被称为LuCI中最酷的功能,该模块的功能是方便的对一个配置文件进行修改。
3.示例
本文中的页面建立在LuCI界面的network下,不单独创建页面,因此无需写view,只用些controller和model就可以了。
1)首先创建一个controller
ccontroller/mycbi.lua
module("LUCI.controller.mycbi", package.seeall)

function index()
entry({"admin", "network", "mycbi_change"}, cbi("mycbi-model/mycbimodule"), "Change My Conf", 30).dependent=false
end

解释一下关键代码:

在index()函数中,使用entry函数来完成每个模块函数的注册,官方说明文档如下:
entry(path, target, title=nil, order=nil)
path is a table that describes the position in the dispatching tree: For example a path of {"foo", "bar", "baz"} would insert your node in foo.bar.baz.
target describes the action that will be taken when a user requests the node. There are several predefined ones of which the 3 most important (call, template, cbi) are described later on on this page
title defines the title that will be visible to the user in the menu (optional)
order is a number with which nodes on the same level will be sorted in the menu (optional)
其中target主要分为三类:call,template和cbi。call用来调用函数,template用来调用已有的htm模版,而CBI模块则是使用非常频繁也非常方便的模块,包含的一系列lua文件构成界面元素的组合,所有cbi模块中的控件都需要写在luci.cbi.Map中,在cbi模块中定义各种控件,Luci系统会自动执行大部分处理工作。在cbi.lua文件中封装了所有的控件元素,例如复选框,下拉列表等。

2)创建model
#mkdir /usr/lib/lua/luci/model/cbi/mycbi-model
#vim /usr/lib/lua/luci/model/cbi/mycbi-model/mycbimodule.lua
m = Map("mycbi", "mycbi conf change interface")
s = m:section(TypedSection, "MySection")
s.addremove = true
s:option(Value, "username", "Name:")
key=s:option(Value, "password", "Password")
key.password=true;
return m

解释一下关键代码:

3)创建配置文件
#vim /etc/config/mycbi
config 'MySection' 'mycbi'

option 'username' 'youruser'
option 'password' 'yourpass'

4. 测试
进入OpenWRT界面,登陆后就可以点击“网络”,如果是英文就点击network,可以看到我们添加的子页面入口:

点击后进入页面如下:

输入用户名密码:root/test,点击保存,后台查看配置文件已经被更改:

5. 问题记录
1)首先,配置文件不能有任何后缀,否则页面加载后是空页面
2)如果出现500 错误,说明lua文件写的有问题,要么是路径错误,要么是语法错误,暂时没找到写日志的方法,可以用wireshark抓包看错误
第2个回答  2010-11-18

见图片

本回答被网友采纳
第3个回答  2010-11-30
d 在工具选项中,改就是
第4个回答  2010-11-20
工具-选项-projection-type ---------first_angle

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网