getmastername.txt

来自「自动化控制visio」· 文本 代码 · 共 17 行

TXT
17
字号
// Gets a shape's master name
function  getMasterName(shape: Visio_TLB.Shape): widestring;

function getMasterName(shape: Visio_TLB.Shape): widestring;
var
  startPos: integer;
begin
  try
    result := shape.Master.Name;
  except
    result := shape.Name;
  end;
  startPos := pos('.', result);
  if (startPos > 0) then
    result := leftStr(result, startPos-1);
end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?