Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zamtmn/zcad
Browse files Browse the repository at this point in the history
  • Loading branch information
zamtmn committed Dec 14, 2024
2 parents 6ffdbe4 + b62135f commit 8913ed2
Show file tree
Hide file tree
Showing 23 changed files with 55,101 additions and 9,760 deletions.
53 changes: 26 additions & 27 deletions cad_source/zcad/velec/managerem/uzvxlsxtocad.pas
Original file line number Diff line number Diff line change
Expand Up @@ -274,33 +274,32 @@ function vImportXLSXToCAD_com(const Context:TZCADCommandContext;operands:TComman
end;


//Получаем имя активного листа
nameActiveSheet:=uzvzcadxlsxole.getActiveWorkSheetName;

//Ищем команду всавки блоков из Excel
uzvzcadxlsxole.searchCellRowCol(nameActiveSheet,xlsxInsertBlockST,ourCell.vRow,ourCell.vCol);
i:=0;

isFinishSearch:= true; //когда поиск пошел с начала
stRow:=ourCell.vRow;

while (ourCell.vRow > 0) and isFinishSearch do
begin
inc(i);

//Создание блоков
creatorBlockXLSX(nameActiveSheet,ourCell.vRow,ourCell.vCol);
//ищем вхождение спец символов
uzvzcadxlsxole.searchNextCellRowCol(nameActiveSheet,xlsxInsertBlockST,ourCell.vRow,ourCell.vCol);
if (stRow=ourCell.vRow) and (stCol=ourCell.vCol) then
isFinishSearch:=false;
if (stRow>ourCell.vRow) then
isFinishSearch:=false;
if (stRow=ourCell.vRow) and (stCol>ourCell.vCol) then
isFinishSearch:=false;

stRow:=ourCell.vRow;
stCol:=ourCell.vCol;
//Получаем имя активного листа
nameActiveSheet:=uzvzcadxlsxole.getActiveWorkSheetName;

//Ищем команду всавки блоков из Excel
uzvzcadxlsxole.searchCellRowCol(nameActiveSheet,xlsxInsertBlockST,ourCell.vRow,ourCell.vCol);
i:=0;

isFinishSearch:= true; //когда поиск пошел с начала
stRow:=ourCell.vRow;

while (ourCell.vRow > 0) and isFinishSearch do
begin
inc(i);
//Создание блоков
creatorBlockXLSX(nameActiveSheet,ourCell.vRow,ourCell.vCol);
//ищем вхождение спец символов
uzvzcadxlsxole.searchNextCellRowCol(nameActiveSheet,xlsxInsertBlockST,ourCell.vRow,ourCell.vCol);
if (stRow=ourCell.vRow) and (stCol=ourCell.vCol) then
isFinishSearch:=false;
if (stRow>ourCell.vRow) then
isFinishSearch:=false;
if (stRow=ourCell.vRow) and (stCol>ourCell.vCol) then
isFinishSearch:=false;

stRow:=ourCell.vRow;
stCol:=ourCell.vCol;
end;

ZCMsgCallBackInterface.TextMessage('Количество добавленных блоков = ' + xlsxInsertBlockST + ' = ' + inttostr(i),TMWOHistoryOut);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
unit DEVICE_VEL_POWER_SHAO05;

interface

uses system,devices;
usescopy blocktype;
usescopy objname_eo;
usescopy objgroup;
usescopy addtocable;
usescopy elreceivers;
usescopy vlocation;
usescopy vtextpointer;
usescopy vspecification;
usescopy vinfopersonaluse;

implementation

begin

BTY_TreeCoord:='PLAN_VEL_Щиты_Щит аварийного освещения 1/2';
Device_Type:=TDT_SilaPotr;
Device_Class:=TDC_Shell;

NMO_BaseName:='ЩАО';
NMO_Suffix:='';
NMO_Template:='@@[NMO_BaseName]';

nametemplatesxlsx:='<zlight>';
ANALYSISEM_icanbeheadunit:=true;

realnamedev:='Щит авар. осв.';
Power:=0.0;
CosPHI:=0.8;
Voltage:=_AC_380V_50Hz;
Phase:=_ABC;

GC_NameGroupTemplate:='@@[GC_HeadDevice].@@[GC_HDGroup]';



INFOTEXTPOINTER_Tp1Up.format:='@@[NMO_BaseName]@@[NMO_Suffix]';
INFOTEXTPOINTER_Tp1Bottom.format:=' ';
INFOTEXTPOINTER_Tp2Up.format:=' ';
INFOTEXTPOINTER_Tp2Bottom.format:=' ';


VSPECIFICATION_Position:='';
VSPECIFICATION_Name:='Щит аварийного освещения';
VSPECIFICATION_Brand:='';
VSPECIFICATION_Article:='';
VSPECIFICATION_Factoryname:='';
VSPECIFICATION_Unit:='шт.';
VSPECIFICATION_Count:=1;
VSPECIFICATION_Weight:='';
VSPECIFICATION_Note:='';
VSPECIFICATION_Grouping:='Щитки, шкафы, ящики, пульты';
VSPECIFICATION_Belong:='';


SerialConnection:=1;

end.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
unit DEVICE_VEL_POWER_SHO05;

interface

uses system,devices;
usescopy blocktype;
usescopy objname_eo;
usescopy objgroup;
usescopy addtocable;
usescopy elreceivers;
usescopy vlocation;
usescopy vtextpointer;
usescopy vspecification;
usescopy vinfopersonaluse;

implementation

begin

BTY_TreeCoord:='PLAN_VEL_Щиты_Щит освещения 1/2';
Device_Type:=TDT_SilaPotr;
Device_Class:=TDC_Shell;

NMO_BaseName:='ЩО';
NMO_Suffix:='';
NMO_Template:='@@[NMO_BaseName]';

nametemplatesxlsx:='<zlight>';
ANALYSISEM_icanbeheadunit:=true;

realnamedev:='Щит освещения';
Power:=0.0;
CosPHI:=0.8;
Voltage:=_AC_380V_50Hz;
Phase:=_ABC;

GC_NameGroupTemplate:='@@[GC_HeadDevice].@@[GC_HDGroup]';

INFOTEXTPOINTER_Tp1Up.format:='@@[NMO_BaseName]@@[NMO_Suffix]';
INFOTEXTPOINTER_Tp1Bottom.format:=' ';
INFOTEXTPOINTER_Tp2Up.format:=' ';
INFOTEXTPOINTER_Tp2Bottom.format:=' ';

VSPECIFICATION_Position:='';
VSPECIFICATION_Name:='Щит освещения';
VSPECIFICATION_Brand:='';
VSPECIFICATION_Article:='';
VSPECIFICATION_Factoryname:='';
VSPECIFICATION_Unit:='шт.';
VSPECIFICATION_Count:=1;
VSPECIFICATION_Weight:='';
VSPECIFICATION_Note:='';
VSPECIFICATION_Grouping:='Щитки, шкафы, ящики, пульты';
VSPECIFICATION_Belong:='';


SerialConnection:=1;

end.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
unit DEVICE_VEL_POWER_SHR1;

interface

uses system,devices;
usescopy blocktype;
usescopy objname_eo;
usescopy objgroup;
usescopy addtocable;
usescopy elreceivers;
usescopy vlocation;
usescopy vtextpointer;
usescopy vspecification;
usescopy vinfopersonaluse;

implementation

begin

BTY_TreeCoord:='PLAN_VEL_Щиты_Щит распределительный 1/2';
Device_Type:=TDT_SilaPotr;
Device_Class:=TDC_Shell;

NMO_BaseName:='ЩР';
NMO_Suffix:='';
NMO_Template:='@@[NMO_BaseName]';

nametemplatesxlsx:='<zlight>';
ANALYSISEM_icanbeheadunit:=true;

realnamedev:='Щит распред';
Power:=0.0;
CosPHI:=0.8;
Voltage:=_AC_380V_50Hz;
Phase:=_ABC;

GC_NameGroupTemplate:='@@[GC_HeadDevice].@@[GC_HDGroup]';

INFOTEXTPOINTER_Tp1Up.format:='@@[NMO_BaseName]@@[NMO_Suffix]';
INFOTEXTPOINTER_Tp1Bottom.format:=' ';
INFOTEXTPOINTER_Tp2Up.format:=' ';
INFOTEXTPOINTER_Tp2Bottom.format:=' ';

VSPECIFICATION_Position:='';
VSPECIFICATION_Name:='Щит распределительный';
VSPECIFICATION_Brand:='';
VSPECIFICATION_Article:='';
VSPECIFICATION_Factoryname:='';
VSPECIFICATION_Unit:='шт.';
VSPECIFICATION_Count:=1;
VSPECIFICATION_Weight:='';
VSPECIFICATION_Note:='';
VSPECIFICATION_Grouping:='Щитки, шкафы, ящики, пульты';
VSPECIFICATION_Belong:='';


SerialConnection:=1;

end.
Loading

0 comments on commit 8913ed2

Please sign in to comment.