在PB中如何选择目录?
- 格式:doc
- 大小:25.00 KB
- 文档页数:3
PB 操作手册创建连接1.正常安装即可2.打开PB,点击database按钮3.在左侧选择ODB ODBC,右单击,选择New profile,弹出如下对话框4. 在profile name输入要创建的库名5. 在data source下选择要连接的ODBC连接6. 在user ID和password分别输入要连接的数据库的用户名和密码7. 在Driver-Specific parameters中输入驱动的路径,如下图8.创建ODBC连接,控制面板-管理工具-数据源-添加9.根据数据库,选择匹配的驱动程序,如连接SQL2005,请选择SQL Server,点击完成10. 选择数据库的服务器,点击下一步,选择“使用用户输入登录ID和密码的SQL Server 验证”;勾选”连接SQL Server以获得其他配置选项的默认设置”;分别输入连接数据库的用户名和密码点击下一步、下一步点击测试数据源,如果测试成功,则表明连接成功11. 在Database profile setup-ODBC框内,选择“preview”,点击test connection,如果提示连接成功,则可以对库进行操作对库进行操作1.选择一个已创建的库,右单击,选择connect2.选择一张表,右单击,选择edit data-grid,即可查看数据3.选择一条数据,右单击,选择delete/insert row,可以进行删除/添加数据,修改后需要保存4.选择ISQL session,可以编写、执行SQL5.选择一条数据,右单击,选择save row as,可以将所选数据存为指定格式的数据,如CSV,TXT等6.选择一张表,使其处于grid状态,在菜单栏,选择rows-import,可以选择数据源,将数据导入表内,导入后需要保存。
PB使用小技巧1. 如何使PB窗口总在最上层通过SetWindowPos函数把窗口的显示层次修改为HWND_TOPMOST,就可以使指定窗口永远不会被其他窗口覆盖,该函数声明为:Function Long SetWindowPos(Long hwnd, Long ord, Long x, Long y, Long dx, Long dy, Long uflag) Library “user32.dll”参数1为要顶层显示的窗口句柄,参数2指定显示的层次,参数7为附加选项,其余参数指定窗口位置和大小,均可忽略。
在窗口的Open或Activate事件中加入如下函数调用:SetWindowPos(Handle(This),-1,0,0,0,0,3)参数2取-1表示在最顶层显示窗口,取1表示在最底层显示;最后一个参数若取1,表示窗口大小保持不变,取2表示保持位置不变,因此,取3(=1+2)表示大小和位置均保持不变,取0表示将窗口的大小和位置改变为指定值。
2. 在PB中如何获得光盘盘符通过GetDriveType函数可以获取驱动器(如:软驱、硬盘、光驱、网络映射驱动器等)的信息,该函数声明为:Function Unit GetDriveTypeA(String drive) Library “kernel32.dll”参数为一个盘符(如“C:”),返回值:1表示未知,2表示软驱,3表示本地硬盘,4表示网络驱动器,5表示光驱。
因此如下代码可以获得光盘的盘符:For I=Asc(‘D’) to Asc(‘Z’)//列举所有可能的CDROM的驱动器If GetDriveTypeA(Char(i)+”:”) = 5 Then//若找到CDROMMessagebox(“CDROM”,Char(i)+”:”)//显示光盘盘符Exit //退出循环End ifNext3. 在PB中如何获取目录信息(1)获取当前目录。
通过GetCurrentDirectory函数可以获取当前目录,该函数声明为:Function Ulong GetCurrentDirectory(Ulong buflen,ref String dir)Library “kernel32.dll”参数2为接受当前目录的字符缓冲区,前面必须加ref表示地址引用;参数1用来指定字符缓冲区的长度。
pb dirlist 函数-回复pb dirlist 函数是一个用于列出目录下文件和子目录的函数。
具体来说,pb dirlist 函数接受一个参数,即目录的路径,然后返回一个包含目录下所有文件和子目录的列表。
在本文中,我们将详细介绍pb dirlist 函数的实现步骤并提供示例代码。
1. 引言首先,我们来解释一下为什么需要pb dirlist 函数。
在许多编程任务中,我们经常会遇到需要列出特定目录下文件和子目录的需要。
例如,在构建一个文件管理器或者需要读取特定文件夹下所有文件的任务中,pb dirlist 函数可以提供快速、方便的解决方案。
2. 实现步骤以下是pb dirlist 函数的实现步骤:2.1 根据输入的目录路径创建一个空的列表,用于存储文件和子目录的名称。
2.2 使用操作系统相关的API,如os 模块,在给定的目录下获取所有文件和子目录的名称。
2.3 遍历获取到的所有文件和子目录的名称。
2.4 判断该名称是一个文件还是一个子目录。
2.5 如果是一个子目录,则递归调用pb dirlist 函数以获取子目录下的文件和子目录的名称,并将结果添加到列表中。
2.6 如果是一个文件,则将文件的名称添加到列表中。
2.7 返回包含所有文件和子目录名称的列表。
3. 示例代码以下是一个使用Python 语言实现的示例代码:pythonimport osdef pb_dirlist(directory):dir_list = []for item in os.listdir(directory):item_path = os.path.join(directory, item)if os.path.isdir(item_path):dir_list += pb_dirlist(item_path)else:dir_list.append(item)return dir_list# 在此处替换为实际的目录路径directory_path = "/path/to/directory"result = pb_dirlist(directory_path)print(result)4. 总结在本文中,我们介绍了pb dirlist 函数的实现步骤并提供了示例代码。
pb中datawindow常用技巧一(2009-04-16 17:09:07)转载▼分类:PowerBuilder标签:杂谈pb中datawindow常用技巧一1、如何让存储文件目录的列,显示图片?答:选择对应的column的display as picture属性为true2、如何复制grid类型的所选择的行的数据到系统剪切板?答:string ls_selectedls_selected=dw_1.Object.DataWindow.Selected.Dataclipbord(ls_selected)4、如何设置的DW底色?在DW的editsource中改变color的值5、如何将Grid风格改成自由格式?在DW的editsource中将processing=1的1改为06、要新建一个表A但风格和现有表格B风格一样,怎么将A表快速设置成表B风格?复制B表C,在C表的DW中的editsource中将表名和字段名改成A表的,即可7、如何实现gird风格的datawindow的多栏表头?答:添加text到header带区,并设置band属性为foreground保存,edit source 修改text的x和width属性表达式如下:x="100~t integer(describe('firstcol.x')" width="100~tinteger(describe('lastcol.x')) - integer(describe('firstcol.x')) +integer(describe('lastcol.width'))8、如何过滤dddw编辑风格的显示值为指定值的记录?答:dw_1.setfilter("lookupdisplay('column_name')='"+ls_display_value_your+"'") dw_1.filter()9、如何设置datawindow的某一列为空?答:string ls_temp[]setnull(ls_temp)dw_1.object.columnname.primary.current=ls_temp10、如何设置datawindow的单双行不同颜色间隔?答:在detail带区的color属性表达式中写上if(mod(getrow(),2)=1 ,rgb(255,0,0),rgb(0,255,0)),如果是当前行以第三种颜色表示,表达式如下:if(getrow()=current(),rgb(255,0,0),if(mod(getrow(),2)=1 ,rgb(0,0,255),rgb(0,255,0)))11、如何获取指定名称的datawindowobject?答:DWObject ldwo_use,ldwo_abc ldwo_use = dw_1.Object ldwo_abc =ldwo_use.__get_attribute("t_1",FALSE)//t_1为datawindow中text对象的名称12、如何缩放datawindow的打印大小?答:dw_1.object.datawindow.zoom=150 or dw_1.object.datawindow.zoom=75 13、如何在已过滤后的数据基础上对datawindow进行过滤?答:dw_1.setfilter(dw_1.describe("datawindow.table.filter")+your_join+your_new_filt er)dw_1.filter()14、如何在datawindow中显示动态时间?答:建立一个计算域,表达式为string(datetime(today(),now()),'yyyy年mm月dd日hh点mm分ss秒'),同时设置datawindow的属性dw_1.Object.DataWindow.Timer_Interval=50015、如何让带用title bar的datawindow控件的标题栏诚活动窗口的颜色?答:外部函数定义:funcation logn SetActiveWindow(long hwnd ) Library "user32.dll" datawindow控件的clicked事件代码:setactivewindow(handle(this))16、如何设置datawindow的当前行指示图标?答:在datawindow中建立一个计算列,expression为'',并将该计算列移动为datawindow的第一个列,在datawindow控件的rowfocuschanged事件中写入代码:SetRowFocusIndicator(hand!)或setrowfucsindicator(p_1)//p_1为窗口上的picture控件名17、如何通过代码打开dddw?答:定义外部函数引用声明SUBROUTINE keybd_event( int bVk, int bScan, int dwFlags, int dwExtraInfo) LIBRARY "user32.dll"代码如下:[constant integer VK_F4 = 115dw_1.SetFocus()dw_1.SetColumn( "dept_head_id" ) //设置当前dddwkeybd_event( VK_F4,0,0,0 ) // 按下F4键keybd_event( VK_F4,0,2,0 ) // 释放F4键18、如何打印datawindow的内容到文件中?答:dw_1.object.datawindow.print.fileName ="c:\temp.prn"dw_1.print()19、如何设置dddw的初始值?答:dw_1.object.columnname.Initial="your_initial_value"20、如何只显示不同的数据?答:dw_1.filter("isnull(columnname[-1]) and columnname<>columnname[-1]") dw_1.filter()21、如何让带有title bar的datawindow不可以移动?答:在datawindow的自定义事件ue_nchittest(pbm_nchittest)中写入如下代码:return 122、如何在N-UP显示风格中建立基于第N栏中的列的计算列?答:如column有两列,number和price ,并显示为两栏,则第一栏的cost计算列的expression为number*price,第二栏的cost_1计算列的expression为number[1]*price[1]23、如何清空ddlb或edit.codetable中项目?答:dw_1.Object.columnname.Values=""24、如何实现指定的column的字体旋转90度?答:dw_1.object.columnname.font.Escapement ="900"25、如何获取datawindow的sql代码?答:可以通过以下四种方法获取sql代码:string szselectszselect=dw_1.describe("datawindow.table.select")szselect=dw_1.describe("datawindow.table.sqlselect")szselect=dw_1.describe("datawindow.table.select.attribute")szselect=dw_1.getsqlselect()27、如何获取datawindow对象占有的虚拟存储的容量?答:使用datawindow.storage属性举例:在datawindow控件的retrieverow事件中,写如如下代码:long lstoragelstorage=long(dw_1.object.datawindow.storage)if lstorage>50000 then dbcancel()28、如何连续在同一张纸打印两个数据窗口?答:dw_1.object.datawindow.print.filename="temp.prn"dw_2.object.datawindow.print.filename="temp.prn"dw_1.print()dw_2.print()29、如何设置datawindow分组后每个分组中的记录号?答:建立一个计算列,expression为getrow() - first(getrow() for group 1)+1 30、如何实现在datawindow中只有新增的行,才可以编辑?答:在所有的column的protect属性表达式中写入以下表达式:if(isrownew(),'0','1')31、除了循环以外,有没有更好的方法统计数据窗口中处于选中状态的行数?一般习惯于使用循环来统计数据窗口中处于选中状态的行数,有没有更好的方法?其实此问题在应用上用处不大,讨论一下,活跃一下思维还是有好处的。
PB中下拉列表使用的若干技巧于红聂尚宇摘要对PB中下拉列表的使用方法进行了研究,并提出了几种使用下拉列表的实现方法,实践表明这些方法具有简单实用的特点。
关键词下拉列表;动态;控件;事件;Some Skills in the Use of DDLB of PBYu Hong Nie ShangyuDepartment of Electronic Engineering, DFUAbstract The use of DDLB in PB is studied and some skills are proposed. The results show that these skills are simple and practical.Key words DDLB; dynamic; control; event随着科学技术的不断发展,计算机已经应用于社会的各个领域,相应的管理软件的编制工作显得尤为重要。
现有的编程工具中,PowerBuilder 是数据库管理软件设计比较理想的工具,但如何合理地选用控件和灵活地使用每一个控件,以充分发挥PB的优势,是人们在编程过程中常遇到的难题。
作者对PB中的控件之一——下拉列表的使用[1]进行了研究,并提出几个灵活使用下拉列表的方法。
1 下拉列表及其相应的事件①下拉列表是在窗口中定义的一个控件,与之相应的事件如下表所示:件,还会触发Modified事件。
2 动态使用下拉列表传统的下拉列表使用是静态的,它在一定程度上满足了编程的需要,但是不能满足所有需要。
例如,有时希望下拉列表中的选项在程序运行过程中可以变化,这用静态下拉列表定义选项是不能实现的,这就促使人们去思考如何使用动态下拉列表。
有两种情况需要使用动态下拉列表。
1)下拉列表中的选项与数据库中某列的内容相关联②实际应用中,在对数据库表中的数据按名称进行查询时,为了减少输入量,可以将库中某列的内容(如单位名称)列在下拉列表中供用户选择,这样既可以保证选中的项目一定是库中的项目,而且不用输入汉字;又使下拉列表的使用具有一定的灵活性,动态下拉列表选项的确定必须在下拉列表被使用之前进行,可以在下拉列表所在窗口的Open事件中确定,也可以在下拉列表的Getfocus事件中确定,相应的script为string id,icint i-op=1declare c1 cursor forselect hotelid from hotelid-dangan using SQLCA;open c1;fetch c1 into: id;do while sqlca.sqlcode=0select p1602 into :ic from p16 where p1601=:id using sqlca;if finditem(ddlb-1,ic,1)=-1 thenddlb-1.insertitem(ic,+i-op)i-op=i-op+1end iffetch c1 into :id;loopclose c1;其中,下拉列表中的项目取自数据库表hotelid-dangan 的hotelid 列所对应的p16表中的p1602(即单位名称)。
在PB中如何选择目录?.txt精神失常的疯子不可怕,可怕的是精神正常的疯子!在PB中如何选择目录?1.GetFileOpenName(title,pathname,filename{,extension{,filter}})其中pathname包含全部路径+文件名,filename包含文件名,用pathname截掉filename部分即得到要选择的目录PB8以上用GetFolder(),以下的就用API,以前的帖子中有封装好的对象。
首先定义一个名为browseinfo的structure这个structure这样定义unsignedlong hownerunsignedlong pidlrootstring pszdisplaynamestring lpsztitleunsignedlong ulflagsunsignedlong lpfnunsignedlong lparmstring iimage再定义两个external functionFunction unsignedlong SHBrowseForFolderA( browseinfo lpbrowseinfo ) Library 'shell32'Function unsignedlong SHGetPathFromIDListA( unsignedlong pidl, ref string pszPath) Library 'shell32'然后这么写ulong ll_messstring ls_pathls_path = space(255)browseinfo lpbrowseinfolpbrowseinfo.howner = handle(parent)lpbrowseinfo.pszDisplayName = space(255)lpbrowseinfo.lpsztitle = "请选择目录:"lpbrowseinfo.pidlroot = 0lpbrowseinfo.ulflags = 1setnull(lpbrowseinfo.lpfn)ll_mess = SHBrowseForFolderA( lpbrowseinfo )SHGetPathFromIDListA(ll_mess,ls_path)sle_1.text = ls_path2.声明API函数:Function unsignedlong SHGetPathFromIDListA( unsignedlong pidl, ref string pszPath) Library 'shell32'Function unsignedlong SHBrowseForFolderA( browseinfo lpbrowseinfo ) Library 'shell32'Subroutine CoTaskMemFree(ulong idlist) Library 'ole32'建立函数:string browseforfolder(window awi_parent,string(as_caption)函数内容:browseinfo lstr_biitemidlist lstr_idlunsignedlong ll_pidlunsignedlong ll_rInteger li_posString ls_Pathunsignedlong ll_NullSetNull( ll_Null )unsignedLong BIF_RETURNONLYFSDIRS =1lstr_bi.hOwner = Handle( awi_Parent )lstr_bi.pidlRoot = 0lstr_bi.lpszTitle = as_captionlstr_bi.ulFlags = bif_ReturnOnlyFSDirslstr_bi.pszDisplayName = Space( 255 )lstr_bi.lpfn = ll_Nullll_pidl = SHBrowseForFolderA( lstr_bi )ls_Path = Space( 255 )ll_R = SHGetPathFromIDListA( ll_pidl, ls_Path )CoTaskMemFree( ll_pidl )RETURN ls_Path其他地方引用的方法:String ls_dirls_dir = BrowseForFolder( parent, '选择目录')//parent为按钮所在的窗口//ls_dir为选择的目录。
[PB]-控件(一)////////////////////////////////命令按钮-CommandButton-cb_1图象按钮-PictureButton-pb_1【事件】◆Clicked控件单击时◆Constructor在窗口的打开事件之前立即触发◆Destructor在窗口的关闭事件之后立即触发◆DragDrop当被拖动对象释放时触发◆DragEnter被拖动对象的中心通过边缘进入时触发◆DragLeave被拖动对象的中心离开时触发◆DragWithin被拖动对象的中心位于其内时触发◆GetFocus在接受焦点之前(在选中并激活之前)触发◆LoseFocus当失去焦点时触发◆Other当非powerbuilder事件消息发生时触发◆RButtonDown鼠标右键按下时触发◆Help【属性】命令按钮有24个属性,图形按钮除了具有和命令按钮完全相同的24个属性外,还有另外5个属性用来设置图形和文字的显示。
▲Visible取值为False时,不显示此按钮▲Enabled取值为False时,按钮为灰色,不可用▲Default取值为True时,表示该按钮是缺省按钮,当用户没有选择控件,按Enter键时触发该按钮的Clicked事件▲Cancel取值为True时,表示当用户单击Esc键时,可以触发按钮的Clicked事件▲FlatStyle////////////////////////////////列表框-listBox图形列表框-pictureListBox【属性】listbox有35个属性,picturelistbox有40个属性,其中35个和listbox完全相同,另外5个用来设定图形的相关属性。
▲Sor ted,指定列表框中的内容是否排序,不管数字还是字符都按照字符处理,按照ASCII大小进行排序▲VscrollBar、HscrollBar,指定当项目纵向或横向显示不下时,是否显示滚动条▲MultiSelect,此属性为True时表示使用鼠标可以直接同时选中多项▲ExtendSelect,也有进行多项同时选择的属性,但选择方法不同于MultiSelect属性,必须配合Ctrl或Shift按钮,当同时指定这两个属性时,ExtendedSelect属性将会屏蔽MultiSelect属性▲DisableNoScroll,此属性为True时,不管是否必须要滚动条,都显示滚动条;为False时只有在项目多,需要显示滚动条时显示滚动条▲ItemPictureIndex[]integer类型的只读数组,使用该数组可以获取每个图片项目的索引。
1STC802005D0201ArTu PBPanelboardTechnical catalogueIndexThree-step selection process (2)PanelboardGeneral information (4)Selection (5)Custom panelboardGeneral information (6)Selection (7)Custom pan assemblyGeneral information (8)Selection (9)Incoming selection kit (10)MCCB Outgoing breaker selection (11)AccessoriesMCCB (13)Panelboard (14)Custom panelboard and pan assembly (15)In-depth technical information (16)Overall dimensions (20)Lifting and overhead travelling (23)List of codes (24)ABB SACE1ArTu PB Panelboard Three-step selection process3ABB SACE STEP 1Select the fixed Panelboard required from page 5or Select the Custom Panelboard required from page 7or Select the Custom Pan Assembly required from page 9STEP 2Select the incoming device and the inner door required from page 10STEP 3Select the outgoing device required from page 11Remember4ABB SACEArTu PB PanelboardGeneral informationThe ArTu distribution switchboards are enriched by the new ArTuPB Panelboard series, for applications up to 800 A incomer withoutgoing ways up to 250 A, which complete now the ABB offer.The ArTu PB panelboard is extremely sturdy, thanks to the new design in metalwork system.The ArTu PB panelboard is available as wall mounted as standard,and in three configurations of 6, 12 and 18 outgoing ways, withthe option of building your own custom panelboard.The new system allows you to fit T1 and T3 three or four pole and the single pole MCCB off the same copper system using the all Technical characteristicsCompliance with Standards CEI EN 60439-1Rated service voltage - Ue up to 690 V Rated insulation voltage - Ui up to 1000 V Rated frequency 50-60 Hz Rated impulse withstand voltage - Uimp 8 kV Rated current - Inup to 800 A Rated short-circuit short-timeWithstand current - Icw up to 50 kA Rated short-circuit peak current - Ipk up to 110 kA IP degree of protection 43 with doornew plug in system designed by ABB.An extension box is available with a width of 390mm which can be fitted on both sides of the structure.There is also an option of adding a top and bottom extension box;metering extension boxes are also available.Trunking has been fitted vertically behind each row of MCCBs to allow cabling from SR’s, UV’s and AUX contacts to be channelled away. As standard the panelboard is fitted with a plain door but,as an option, it can be fitted with a glazed one.5ABB SACE ArTu PB Panelboard SelectionSTEP 1Select the fixed capacity Panelboardrequired from the table below.Panelboard fixed capacityOrder code* T3 4 pole Panelboard equals only 16 outgoing ways.ArTu PB Custom Panelboard General informationThe new ArTu PB panelboard gives you the flexibility to design your own custom panelboard.There are three sizes for the fixed panelboard, 6, 12 and 18 outgoing ways, and each one can be equipped with an incoming breaker from 250 A to 800 A, three or four pole.Each panelboard has a fixed dimension of copper depending on the quantity of outgoing ways you require.All you have to do is select the plug-in bases and fill up the copper bar to suit the breakers you need.Any left over copper can be shrouded and MCB blanking platescan be used to fill out the inner door.6ABB SACEABB SACE7ArTu PB Custom Pan Assembly General informationAlso the pan assembly version allows you to design your own customized switchboard. As for the panelboard, it is available in three sizes with 6, 12 and 18 outgoing ways, each of which can be equipped with an incoming breaker from 250 A to 800 A, three or four pole.As standard the pan assembly is supplied as a three or four pole.Each pan assembly has a fixed dimension of copper depending on the quantity of outgoing ways you require. All you have to do is select the plug-in bases and fill up the copper bar to suit the breakers you need. Any left over copper can be shrouded andMCB blanking plates can be used to fill out the inner door.8ABB SACEArTu PB Custom Pan AssemblySelectionCustom Pan AssemblyOrder code* T3 4 pole beakers equals only 16 outgoing ways.ABB SACE9ArTu PB PanelboardIncoming selection kitDirect connection kitSTEP 2Select the incoming connection kitrequired from the table below.Order codeIncomer options(Connection kits must be ordered with each incoming breaker)Order codeArTu PB PanelboardMCCB Outgoing breaker selectionSTEP 3Select the outgoing devices requiredfrom the table below.T1B Single pole MCCB(Thermomagnetic release)Order codeT1B Three pole MCCB(Thermomagnetic release)Order codeT1C Three pole MCCB(Thermomagnetic release)Order codeArTu PB PanelboardMCCB Outgoing breaker selectionT1N Three pole MCCB(Thermomagnetic release)Order codeT3N Three pole MCCB(Thermomagnetic release)Order codeT3S Three pole MCCB(Thermomagnetic Release)Order codeFront connection terminal sets are required for all T3 outgoing devices.ArTu PB PanelboardAccessoriesShunt opening release - SOR(cabled version)Undervoltage release - UVR(cabled version)Auxiliary contacts - AUX(cabled version)High terminal cover HTCOrder codeFront terminal for copper cables - FC CUMCCBArTu PB PanelboardAccessoriesGlazed door for panelboardPlinthTop/Bottom extension modulesSide extension modules for panelboardOrder CodeMetering extension modulesCustom PanelboardArTu PB PanelboardAccessoriesPlug In deviceAccessoriesCustom Panelboard and Pan AssemblyIPIP122nd number defined by the CEI 70-1 – IEC 529 Standards1S T C 802095F 0001ArTu PBIn-depth technical informationArTu PBIn-depth technical informationFigure defined by the CEI EN 50102 StandardArTu PB PanelboardIn-depth technical informationCompliance with CEI EN 60439-1 StandardThe ArTu PB Panelbord have undergone the type tests foreseen by the CEI EN 60439-1 Standards. The results of these tests guarantee the performances of the ArTu switchboards and, by using the metalwork structures, ABB SACE air, modular and moulded-case circuit-breakers, mean that the end switchboard constructor does not have to carry out any further type tests by following the selection criteria and the assembly instructions for the various components. These results, which are indicated below, can be referred to for making out the declaration of conformity of the switchboard.Over-temperature (Ref. par. 8.2.1 of the Standard)The table on page 7/5 and following pages shows the thermal dissipation values referred to all the dimensions of ArTu switchboards and to the type of installation, deriving from the type tests carried out. The dissipated power data (in Watt) is according to the admissible over-temperature inside the switchboard (appropriately taking into account the simultaneity factor).ArTu PBRated service voltage:up to 690V ACRated insulation voltage:up to 1000V ACRated impulse withstand voltage:8kVArTu PB up to 400A ArTu PB up to 800AShort-circuit withstand current:phase-phase35kA (1s)50kA (1s)phase-neutral21kA (1s)30kA (1s)Rated max. peak short-circuit current:52,5kA73,5kAArTu PB up to 400A ArTu PB up to 800A(Rif. par. 8.2.4.1)Following the assembly indications of the metal components, the effective electrical continuitybetween the exposed conductive parts is verified, with negligible resistance values.(Rif par. 8.2.4.2)Protection circuit short-circuit withstand current: phase-earthing busbar21kA (1s)30kA (1s)The insulation distances are guaranteed by following the ABB SACE metalwork structure and circuit-breaker assembly and mounting instructions. Mechanical operation is verified by following the assembly and mounting instructions of the ABB SACE metalwork structures and circuit-breakers.ArTu PBWith door IP 43ArTu PB with the following rated characteristics:Rated service voltage up to 690 V Rated insulation voltage up to 1000V Rated current / I CW ArTu PB up to 400A / 35kA flat busbar ArTu PB up to 800A / 50kA profiled busbar Degree of protectionArTu PBIP 43 (with door)ArTu PB PanelboardIn-depth technical informationMaterialArTu PB structure 12/10mm thick pickled steel sheet Panels 12/15/10mm thick steel sheetDoors15/10mm hot galvanised steel sheet. 4mm thick glass tempered from insidePaintingStructureColour Grey orange-peel RAL 7035Base strip colour Grey RAL 7012Standard cycleSheet washingPhosphating with iron salt base Drying in tunnel at 100°CExternal and internal painting with electrostatic application of thermosetting powder enamel with epoxy polyester binders. Grey orange-peel RAL 7035 colour, total thickness: 60/70 micron.Polymerisation in oven at 180°C.Paint characteristicsBinder:epoxy polyester Specific gravity: 1.61 g/cm 3Theoretical coverage:10.4 m 2/kg with average film thickness 60 micron Melting point:85-95°C (Kofler bench method)Granulometry:standard distribution between 5 and 100 micron with average size of theparticles between 30 and 40 micron. Hardening: 12 min. at 190°C (temperature of object)Hardness:1H - 2H DIN 53152 bending elasticity:unaltered on 1/4” spindle DIN 53151 reticular adherence:GT O (100%)Erichem elasticity:SEN DIN 53156: > 6mm Gardner resistance to impact:25 Kg. x cm.Tests carried out on degreased and phosphated sheets with film thickness of 60/70 micron.The painting has passed the resistance tests to saline fog (193 hours).Ambient characteristicsType of installation indoors Installation conditions Wall / Floor Service climate (t ° /% r.h.)constant 23°C/83% - 40°C/93%variable 23°C/98% - 40°C/98%Ambient temperature limitsoperating -5°C +40°C storage-25°C +55°CThe above is valid if the switchboard is designed and constructed:•selecting the materials according to the performances indicated in the ABB catalogues;•sizing the conductors according to the prescriptions of the EN 60439-1 and CEI 64-8 Standards;•carrying out the individual tests foreseen under the EN 60439-1 Standard successfully.when correctly selected and assembled, as per the indications given in this catalogue and in the instruction manual, they allow construction of switchboards complying with the EN 60439-1 Standard, on the basis of what is foreseen by the Low Voltage Directive of the European Community (Directive 73/23/EEC, Law 791/1977).ArTu PB Panelboard Overall DimensionsArTu PB PanelboardOverall Dimensions21ABB SACEArTu PB PanelboardOverall Dimensions22ABB SACE23ABB SACE In the case of structures W=900mm (with internal or external cable container) containing busbar systems, check the centre of gravity before handling.Structure(mm)(mm)(mm)(mm)ArTu PBWidth 600mm4759697296For greater safety during transport using a fork-lift truck,it is advisable to anchor the switchboard to the truck:To handle using a crane or overhead travelling crane, check the following conditions before lifting the switchboard:excellent state of the ropes or chains;•the angle between the lifting ropes and the switchboard roof must be ≥ 45°;•the maximum number of columns transported is 3;•ArTu PB maximum weight lifted as per DIN 580 (M8).To respect the conditions described above, a lifting beam with appropriate characteristics can be used when there are several columns side by side.24ABB SACEArTu PB PanelboardList of codes640T1PB3400A 6 way 3 pole T1 outgoing 160A 1050x690x20474,95640T3PB3400A 6 way 3 pole T3 outgoing 250A 1250x690x20486,35680T3PB3800A 6 way 3 pole T3 outgoing 250A 1250x690x20487,25640T1PB4400A 6 way 4 pole T1 outgoing 160A 1250x690x20485,65640T3PB4400A 6 way 4 pole T3 outgoing 250A 1450x690x24099,65680T3PB4800A 6 way 4 pole T3 outgoing 250A 1450x690x240101,05124T1PB3400A 12 way 3 pole T1 outgoing 160A 1450x690x240100,15124T3PB3400A 12 way 3 pole T3 outgoing 250A 1650x690x240109,55128T1PB3800A 12 way 3 pole T1 outgoing 160A 1450x690x240101,35128T3PB3800A 12 way 3 pole T3 outgoing 250A 1650x690x240111,15124T1PB4400A 12 way 4 pole T1 outgoing 160A 1650x690x240112,05124T3PB4400A 12 way 4 pole T3 outgoing 250A 1850x690x240125,95128T1PB4800A 12 way 4 pole T1 outgoing 160A 1650x690x240114,15128T3PB4800A 12 way 4 pole T3 outgoing 250A 1850x690x240128,75184T1PB3400A 18 way 3 pole T1 outgoing 160A 1850x690x240127,65188T1PB3800A 18 way 3 pole T1 outgoing 160A 1850x690x240130,05188T3PB3800A 18 way 3 pole T3 outgoing 250A 2050x690x240138,65184T1PB4400A 18 way 4 pole T1 outgoing 160A 2050x690x240139,95188T1PB4800A 18 way 4 pole T1 outgoing 160A 2050x690x240143,05188T3PB4800A 16 way 4 pole T3 outgoing 250A 2050x690x240145,15CU680PB3 6 Way 3 pole (800A Busbar) 1250mm High 1250x690x20485,77CU128PB312 Way 3 pole (800A Busbar) 1650mm High 1650x690x240105,97CU188PB318 Way 3 pole (800A Busbar) 2050mm High 2050x690x240128,77CU680PB4 6 Way 4 pole (800A Busbar) 1450mm High 1450x690x24095,37CU128PB412 Way 4 pole (800A Busbar) 1850mm High 1850x690x240117,37CU188PB418 Way 4 pole (800A Busbar) 2050mm High 2050x690x240131,37CU680PA3 6 Way 3 pole (800A Busbar) 1177mm High 1177x544x10518,09CU128PA312 Way 3 pole (800A Busbar) 1577mm High 1577x544x10524,09CU188PA318 Way 3 pole (800A Busbar) 1977mm High 1977x544x10527,99CU680PA4 6 Way 4 pole (800A Busbar) 1377mm High 1377x544x10519,09CU128PA412 Way 4 pole (800A Busbar) 1777mm High 1777x544x10525,89CU188PA418 Way 4 pole (800A Busbar) 1977mm High 1977x544x10530,59400DC3/4P 400A Direct connection kit 3 and 4 pole 1,010800DC3P 800A Direct connection kit 3 pole 2,210800DC4P 800A Direct connection kit 4 pole 2,610P6X6DC Direct connection inner door 4,810250T33P 250A T3 3 pole MCCB connection kit 3,010250T34P 250A T3 4 pole MCCB connection kit 3,410P6X6T3T3 inner door7,5310400S53P 400A S5 3 pole MCCB connection kit 3,610400S54P 400A S5 4 pole MCCB connection kit 4,210630S53P 630A S5 3 pole MCCB connection kit 3,710630S54P 630A S5 4 pole MCCB connection kit 4,410P6X6S5S5 inner door7,5310800S63P 800A S6 3 pole MCCB connection kit 3,110800S64P 800A S6 4 pole MCCB connection kit 3,510P6X6S6S6 inner door 7,5310PV1000Glazed Door 1000mm 1000h x 690w 10,314PV1200Glazed Door 1200mm 1200h x 690w 12,314PV1400Glazed Door 1400mm 1400h x 690w 14,414PV1600Glazed Door 1600mm 1600h x 690w 16,314PV1800Glazed Door 1800mm 1800h x 690w 18,314PV2000Glazed Door 2000mm2000h x 690w20,314ZL1000Four Corner Feet 100mm High For Main Structure 2,514ZL1001Finishing Profile For Above Plinth1,114Part DescriptionDimensions Weights Page Number (Kg)Part DescriptionDimensionsWeights Page Number (Kg)ZL3000Two Feet 100mm High For Side Extension Box 1,514ZL2001Finishing Profile For Side Extension Box 0,714200EXMOD 200mm High top & bottom extension box 200h x 690w 12,514RC1000385mm structure extension box 385h x 690w 24,014RC2000385mm cable container extension box 385h x 390w 18,014MI1000Side Extension Box Uprights 1000mm 1000mm 2,814VC1000Side Extension Box Cable Container 1000mm 1000mm 9,814PC1002Side Extension Box Front Door 1000mm 1000mm 5,714MI1200Side Extension Box Uprights 1250mm 1250mm 3,414VC1200Side Extension Box Cable Container 1250mm 1250mm 11,714PC1202Side Extension Box Front Door 1250mm 1250mm 7,214MI1400Side Extension Box Uprights 1450mm 1450mm 4,014VC1400Side Extension Box Cable Container 1450mm 1450mm 13,714PC1402Side Extension Box Front Door 1450mm 1450mm 8,414MI1600Side Extension Box Uprights 1650mm 1650mm 4,514VC1600Side Extension Box Cable Container 1650mm 1650mm 15,014PC1602Side Extension Box Front Door 1650mm 1650mm 9,514MI1800Side Extension Box Uprights 1850mm 1850mm 5,114VC1800Side Extension Box Cable Container 1850mm 1850mm 16,214PC1802Side Extension Box Front Door 1850mm 1850mm 10,614MI2000Side Extension Box Uprights 2050mm 2050mm 5,714VC2000Side Extension Box Cable Cotainer 2050mm 2050mm 18,014PC2002Side Extension Box Front Door 2050mm 2050mm11,814PLT11L1/L3P T1 Single Pole L1 & L3 plug in base0,315PLT11L2P T1 Single Pole L2 plug in base 0,315PLT13P T1 Three Pole plug in base 0,915PLT14P T1 Four Pole plug in base 0,415PLT23P T2 Three Pole plug in base 1,015PLT24P T2 Four Pole plug in base 0,415PLT33P T3 Three Pole plug in base 1,115PLT34P T3 Four Pole plug in base 0,515PLRCD Dummy Base For RCD0,915SH630Busbar Shroud 630mm Long 3 pcs 630mm Long 0,315MODT1T1 Busbar Shroud 10pcs 0,115MODT2T2 Busbar Shroud 10pcs 0,115MODT3T3 Busbar Shroud 10pcs 0,115SPARE1Spares Kit0,815200EXMET200mm High metering box200h x 690w11,81S T C 005001B 0901 06/’03P r i n t e d i n I t a l y 2.000/O c é F a c i l i t y S e r v i c e s S P A /C A LABB SACE S.p.A.Automation and Distribution Boards23846 Garbagnate Monastero (LC) - Italy Via Italia, 58Tel.: ++39 031.3570.1 - Telefax: ++39 031.3570.228To take into account the evolution of Standards and materials, the characteristics and overall dimensionsindicated in this catalogue can only be considered binding after confirmation from ABB SACE.Certificate N °1612/98/S Certificate N °EMS-051Certificate N °OHS-015。
树形目录在PB中的实现与应用1.引言在管理信息系统的开发中,经常需要获取本地计算机中的树形目录结构和相应的文件信息,如进行目录的选择和特殊文件的选取,在PB中并没有提供专门的树形目录对象,这样就需要程序开发人员自己来实现相应的树形目录。
本文针对这种情况,提供了一种用纯PB代码实现树形结构的方法。
2.PB中树形目录的实现方法PB中的ListBox列表框控件提供了显示目录和文件的能力。
在程序中可以利用PB的树形控件TreeView动态生成树形目录结构。
我们使用ListBox控件的函数DirList来实现,函数DirList以满足条件的文件名填充列表框的列表项,其使用方法如下:listboxname.DirList(文件模式,文件类型)其中文件类型的值如下所示:在程序中可将几种类型的值相加以获取相应的文件或目录信息。
下面结合一个实例介绍树形目录的实现方法。
通过树形目录可以获取计算机中的任意目录,然后显示需要显示的文件(本例中显示浏览器可以查看的文件类型:htm,html,swf,gif,jpg,txt等)。
程序中主要使用的控件如下所示:程序具体实现分成以下几个步骤:第一步:在tv_dir的constructor事件中生成所有驱动器信息,代码如下:String ls_DriverTypelb_dir.DirList("",16384)li_count = lb_dir.totalitems()IF li_count > 0 thenfor i = 1 to li_countltvi_bel = lb_dir.Text(i)ltvi_New.Data = i -1ltvi_New.Children = TRUE//根据驱动器类型设置图标ls_DriverType=uf_drivetype(lb_dir.Text(i))//函数uf_drivetype用来获取驱动器类型,根据类型设置图标Choose case ls_DriverTypecase "REMOVABLE"ltvi_New.PictureIndex = 5ltvi_New.SelectedPictureIndex =5CASE "FIXED"ltvi_New.PictureIndex = 1ltvi_New.SelectedPictureIndex =2CASE "CDROM"ltvi_New.PictureIndex = 6ltvi_New.SelectedPictureIndex =6END CHOOSEThis.InsertItemlast(0, ltvi_New)nextThis.selectitem(1)End if第二步,在tv_dir的itempopulate事件中生成相应目录的下级目录信息:For li_i=1 to li_numls_Data=lb_dir.Text(li_i)If Mid(ls_data,1,1)="[" Thenltvi_bel =mid(ls_data,2,len(ls_data) -2 )ltvi_New.Data = 1LB_next.dirlist(ls_driver+":\"+ltvi_bel,16+32768)if lb_next.totalitems()>1 Thenltvi_New.Children = TRUEelseltvi_New.Children = FalseEnd ifltvi_New.PictureIndex = 3ltvi_New.SelectedPictureIndex =4tv_dir.InsertItemlast(handle, ltvi_New)End ifNextEnd IfIF li_level>=2 Then //选择目录树中的子目录ls_driver=uf_get_dir(li_level,tv_dir,handle,ltvi_bel)lb_dir.DirList(ls_Driver,16+32768) //显示当前目录子目录信息li_num=lb_Dir.totalitems()For li_i=1 to li_numls_Data=lb_dir.Text(li_i)If Mid(ls_data,1,1)="[" and mid(ls_data,2,2)<>".." Thenltvi_bel =mid(ls_data,2,len(ls_data) -2 )ltvi_New.Data = 1LB_next.dirlist(ls_driver+"\"+ltvi_bel,16+32768)if lb_next.totalitems()>1 Thenltvi_New.Children = TRUEelseltvi_New.Children = FalseEnd ifltvi_New.PictureIndex = 3ltvi_New.SelectedPictureIndex =4tv_dir.InsertItemlast(handle, ltvi_New)End ifNextEnd If第三步:当用户单击某一具体目录时,显示该目录中满足条件的文件名,代码如下:Int li_num,li_i,li_long,iTreeViewItem ltvi_curString ls_dir,ls_dataString Filetype[8]//设定需要显示的文件类型filetype[1]=".htm"filetype[2]=".html"filetype[4]=".swf"filetype[5]=".gif"filetype[6]=".jpg"filetype[7]=".shtml"filetype[8]=".txt"li_long=8this.GetItem(handle,ltvi_cur)If ltvi_cur.level=1 thenls_dir=mid(ltvi_bel,3,1)+":\"elsels_dir=uf_get_dir(ltvi_cur.level,this,handle,ltvi_bel)end ifis_dir=ls_dirLb_next.DirList(ls_dir+"\*.*",0+1+2+4+32) //显示所有文件li_num=lb_Dir.totalitems()lb_file.Reset()//将指定文件显示在列表框中For li_i=1 to li_numls_Data=lb_next.Text(li_i)For i=1 to li_longif match(lower(Right(ls_data,len(FileType[i]))),Filetype[i]) then lb_file.addItem(ls_data)NextNext第四步:在OLE控件中显示所选文件的内容,主要代码如下:其中程序中使用的uf_get_dir为用户自定义函数,该函数用来获取所选定目录的完整路径。
pb dirlist 函数-回复[pb dirlist 函数] 一个强大的目录列表函数目录列表是一个常见的需求,尤其是在处理文件系统或网站开发中。
为了方便地获取和展示目录中的文件和子目录,开发者通常需要编写大量的代码。
然而,幸运的是,有一个强大的函数[pb dirlist]可以轻松地完成这项任务。
[pb dirlist]是一种现代化的函数,广泛应用于不同的编程语言和平台上。
它可以给定一个路径作为参数,并返回一个包含该路径下所有文件和子目录的列表。
这个函数提供了丰富的选项,以满足各种需求,并能够灵活地适应不同的应用场景。
使用[pb dirlist]只需要几个简单的步骤。
首先,我们需要确定要读取的目录路径。
可以是本地文件系统中的任何目录,也可以是远程服务器上的目录。
接下来,我们需要选择适当的选项来配置[pb dirlist]函数的行为。
选项包括排序方式、过滤规则、文件大小限制、递归深度等。
例如,我们可以选择按文件名称进行排序,这样可以更容易地找到目标文件。
另外,我们还可以添加一些过滤规则,比如只显示特定文件类型或名称匹配的文件。
一旦我们确定了选项,我们就可以调用[pb dirlist]函数,并将路径和选项作为参数传递进去。
函数将会执行相应的操作,并返回一个包含文件和子目录的列表。
这个列表可以是一个数组、一个数据框架或一个迭代器,具体取决于使用的编程语言和平台。
在得到目录列表后,我们可以进一步处理数据。
我们可以根据需要进行排序、过滤、转换或分组。
这样,我们就可以根据自己的需求,将目录列表展示在不同的环境中。
与传统的目录列表函数相比,[pb dirlist]具有许多优势。
首先,它是一个高度可定制的函数,可以根据实际情况灵活选择选项,以满足我们的需求。
其次,它是一个高效的函数,可以快速获取大量的文件和子目录,并进行相应的处理。
最后,它是一个跨平台的函数,可以在不同的操作系统和编程语言中使用,无需额外的配置。
在PB中如何选择目录?
1.
GetFileOpenName(title,pathname,filename{,extension{,filter}})
其中pathname包含全部路径+文件名,filename包含文件名,用pathname截掉filename部分即得到要选择的目录
PB8以上用GetFolder(),以下的就用API,以前的帖子中有封装好的对象。
首先定义一个名为browseinfo的structure
这个structure这样定义
unsignedlong howner
unsignedlong pidlroot
string pszdisplayname
string lpsztitle
unsignedlong ulflags
unsignedlong lpfn
unsignedlong lparm
string iimage
再定义两个external function
Function unsignedlong SHBrowseForFolderA( browseinfo lpbrowseinfo ) Library 'shell32'
Function unsignedlong SHGetPathFromIDListA( unsignedlong pidl, ref string pszPath) Library 'shell32'
然后这么写
ulong ll_mess
string ls_path
ls_path = space(255)
browseinfo lpbrowseinfo
lpbrowseinfo.howner = handle(parent)
lpbrowseinfo.pszDisplayName = space(255)
lpbrowseinfo.lpsztitle = "请选择目录:"
lpbrowseinfo.pidlroot = 0
lpbrowseinfo.ulflags = 1
setnull(lpbrowseinfo.lpfn)
ll_mess = SHBrowseForFolderA( lpbrowseinfo )
SHGetPathFromIDListA(ll_mess,ls_path)
sle_1.text = ls_path
2.
声明API函数:
Function unsignedlong SHGetPathFromIDListA( unsignedlong pidl, ref string pszPath) Library 'shell32'
Function unsignedlong SHBrowseForFolderA( browseinfo lpbrowseinfo ) Library 'shell32'
Subroutine CoTaskMemFree(ulong idlist) Library 'ole32'
建立函数:
string browseforfolder(window awi_parent,string(as_caption)
函数内容:
browseinfo lstr_bi
itemidlist lstr_idl
unsignedlong ll_pidl
unsignedlong ll_r
Integer li_pos
String ls_Path
unsignedlong ll_Null
SetNull( ll_Null )
unsignedLong BIF_RETURNONLYFSDIRS =1
lstr_bi.hOwner = Handle( awi_Parent )
lstr_bi.pidlRoot = 0
lstr_bi.lpszTitle = as_caption
lstr_bi.ulFlags = bif_ReturnOnlyFSDirs
lstr_bi.pszDisplayName = Space( 255 )
lstr_bi.lpfn = ll_Null
ll_pidl = SHBrowseForFolderA( lstr_bi )
ls_Path = Space( 255 )
ll_R = SHGetPathFromIDListA( ll_pidl, ls_Path )
CoTaskMemFree( ll_pidl )
RETURN ls_Path
其他地方引用的方法:
String ls_dir
ls_dir = BrowseForFolder( parent, '选择目录')//parent为按钮所在的窗口//ls_dir为选择的目录。