Dear Ian,

Continue. 


I have checked this trick and it was OK.
So I have gone some further.
I have developed special server for Rodnik Software's customers giving fast
access to Russian standard libraries and some features.
The our Support Server has a few parts:
Support.ddb - database with libraries and templates
Support.ins - installator
Support.rcs - resource file
and a few BMP for button.

Installator contains text below. Don't think about Russian -- this example
need just to understand the spructure of files.

--------------------------------------------------------------------

ClientInsFile 0.0
EditorExePath 'TextEdit.DLL'
EditorName 'Support'
EditorDescription      'Поддержка от компании Родник Софт'
Version                'Версия 1.1.2'
Date                   '14 Июня 2001 г.'
HelpAboutInfo          'Данное программное обеспечение распространяется в
рамках технической поддержки лицензионным пользователям системы Protel 99
SE.'
CopyRight              'Copyright © Rodnik Software 2001, Потапов Ю.В.'
EditorToolbar                 'Sch'    'Компоненты по ГОСТ'  'OFF'

--------------------------------------------------------------------

The last line is very important because it adds new toolbar to SCH server.

The resource file contain the number of blocks. Each block changes one
resourse.
The srtucture of resource file is below.

-------------------------------------------------------------------

UpdateResource  --- operation
Begin
    Kind ToolBar   --- kind of updating resourse
    Name SchematicTools  --- name of updating resourse
    Action Add --- updating action (can be Add, Delete and etc. see HELP)
    ReferencePosition After --- how to update
    ReferenceItem 'C:\PROGRAM FILES\DESIGN EXPLORER 99
SE\SYSTEM\BUTTONS\WIRTOOLS.BMP' *   ----  the object in resource to update
    Description
    Begin    ----  this block adds the button to turn ON/OFF the toolbar
described in last line in installer file.
      Button 'C:\Program Files\Design Explorer 99
SE\Support\TransistorPNP.bmp'
'Client:CustomizeResources(ToggleToolbar=Компоненты по
ГОСТ|$Description=Включить/выключить панель Компоненты по ГОСТ)'
    End
End

-------------------------------------------------------------------

This is an updating block. But if you want just add a new toolbar the block
will be some simlper: name of Toolbar, position on screen and description of
buttons and linked processes.

-------------------------------------------------------------------

Toolbar 'Компоненты по ГОСТ' 'Floating' 100 400
Begin
     Button 'C:\Program Files\Design Explorer 99 SE\Support\Resistor.bmp'
'Sch:PlacePart(PartType=100k|LibReference=РЕЗИСТОР|Design=\Support\Support.d
db|Library=\Библиотеки по
ГОСТ\Резисторы.lib|Orientation=0|Designator=R?|$Description=Резистор
постоянный простой)'
     Button 'C:\Program Files\Design Explorer 99
SE\Support\Resistor0050.bmp'
'Sch:PlacePart(PartType=100k|LibReference=РЕЗИСТОР_0_05_ВТ|Design=\Support\S
upport.ddb|Library=\Библиотеки по
ГОСТ\Резисторы.lib|Orientation=0|Designator=R?|$Description=Резистор
постоянный 0.05 Вт)'
     Separator
     Button 'C:\Program Files\Design Explorer 99 SE\Support\Capacitor.bmp'
'Sch:PlacePart(PartType=1000|LibReference=КОНДЕНСАТОР|Design=\Support\Suppor
t.ddb|Library=\Библиотеки по
ГОСТ\Конденсаторы.lib|Orientation=0|Designator=C?|$Description=Конденсатор
простой)'
     Button 'C:\Program Files\Design Explorer 99 SE\Support\CapacitorE.bmp'
'Sch:PlacePart(PartType=10 мк х 20
В|LibReference=КОНДЕНСАТОР_ЭЛ_1_1|Design=\Support\Support.ddb|Library=\Библи
отеки по
ГОСТ\Конденсаторы.lib|Orientation=0|Designator=C?|$Description=Конденсатор
электролитический)'
     Separator
     Button 'C:\Program Files\Design Explorer 99
SE\Support\TransistorPNP.bmp'  'Sch:PlacePart(PartType=
|LibReference=ТРАНЗИСТОР_PNP|Design=\Support\Support.ddb|Library=\Библиотеки
по ГОСТ\Транзисторы.lib|Orientation=0|Designator=VT?|$Description=Транзистор
p-n-p)'
     Button 'C:\Program Files\Design Explorer 99
SE\Support\TransistorNPN.bmp'  'Sch:PlacePart(PartType=
|LibReference=ТРАНЗИСТОР_NPN|Design=\Support\Support.ddb|Library=
End

------------------------------------------------------------------

If you want update the menu the block will have same structure but some
different contents. Codes (Begin  .... body ... End) create ierarchical tree
of menu.

------------------------------------------------------------------

UpdateResource
Begin
    Kind Menu
    Name SchematicMenu
    Action Add
    ReferencePosition Before
    ReferenceItem '&Bus' *
    Description
    Begin
      Popup 'Компоненты по ГОСТ'
      Begin
        Popup 'Резисторы'
        Begin
          MenuItem 'Резистор постоянный простой'
'Sch:PlacePart(PartType=100k|LibReference=РЕЗИСТОР|Design=\Support\Support.d
db|Library=\Библиотеки по ГОСТ\Резисторы.lib|Orientation=0|Designator=R?)'
          MenuItem SEPARATOR
          MenuItem 'Варистор горизонтальный'
'Sch:PlacePart(PartType=100k|LibReference=РЕЗИСТОР_ВАРИСТ_2|Design=\Support\
Support.ddb|Library=\Библиотеки по
ГОСТ\Резисторы.lib|Orientation=0|Designator=RU?)'
        End    
        Popup 'Конденсаторы'
        Begin
          MenuItem 'Конденсатор простой'
'Sch:PlacePart(PartType=1000|LibReference=КОНДЕНСАТОР|Design=\Support\Suppor
t.ddb|Library=\Библиотеки по
ГОСТ\Конденсаторы.lib|Orientation=0|Designator=C?)'
          MenuItem 'Конденсатор электролитический'
'Sch:PlacePart(PartType=10 мк х 20
В|LibReference=КОНДЕНСАТОР_ЭЛ_1_1|Design=\Support\Support.ddb|Library=\Библи
отеки по ГОСТ\Конденсаторы.lib|Orientation=0|Designator=C?)'
        End    
      End    
    End
End

To be continued in part 3

Best regards,
Yuri V.Potapoff
technical expert
Rodnik Software, Inc.
1 Nakhimovsky ave., bldg.1, Moscow, 113556 Russia
Phones: +7 (095) 113-2688; +7 (095) 113-7001
Fax:    +7 (095) 317-9754
E-mail: [EMAIL PROTECTED]
http://www.rodnik.ru


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* To post a message: mailto:[EMAIL PROTECTED]
*
* To leave this list visit:
* http://www.techservinc.com/protelusers/leave.html
*                      - or email -
* mailto:[EMAIL PROTECTED]?body=leave%20proteledaforum
*
* Contact the list manager:
* mailto:[EMAIL PROTECTED]
*
* Browse or Search previous postings:
* http://www.mail-archive.com/proteledaforum@techservinc.com
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to