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/[email protected]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Reply via email to