Nice to meet you.
I think that this is useful for you, though I might have misunderstood.
code:
{
Data file - "Input File.txt" in VectorWorks Folder, text delimited in tab
Name Symbol X Y Z (Name is unique name.)
Name1 Sym1 0.0 0.0 0.0
Name2 Sym1 1.0 0.0 0.0
Name3 Sym2 2.0 0.0 0.0
Name4 Sym2 3.0 0.0 0.0
.
.
.
}
procedure Put3DSymbols;
{$ DEBUG}
const
DataFile = 'Input File.txt';
Msg1 = ' is used other symbol.';
Msg2 = 'Do you replace it by a new symbol?';
Msg3 = ' is used other object.';
Msg4 = 'Do you replace it by a symbol?';
SymbolObj = 15;
LF = Chr(13);
var
h :handle;
x, y, z :real;
x0, y0, z0 :real;
name, sym, sym0 :string;
dummy :string;
procedure CreateSymbol(name, sym:string; x, y, z:real);
begin
NameObject(name);
Symbol(sym, 0, 0, 0);
Move3DObj(LNewObj, x, y, z);
end;{CreateSymbol}
begin{main}
Open(DataFile);
StdReadLn(dummy);
while not EOF(DataFile) do begin
ReadLn(name, sym, x, y, z);
h:= GetObject(name);
if h = nil then begin
CreateSymbol(name, sym, x, y, z);
WriteLn(name, ': is new symbol.');
end
else begin
if GetType(h) = SymbolObj then begin
sym0:= GetSymName(h);
if sym = sym0 then begin
GetSymLoc3D(h, x0, y0, z0);
if (x0 = x) & (y0 = y) & (z0 = z) then begin
WriteLn(name, ': no operation.');
end
else begin
Move3DObj(h, x-x0, y-y0, z-z0);
WriteLn(name, ': moved.');
end;
end
else begin
if YNDialog(Concat('"', name, '"', Msg1, LF, Msg2)) then begin
DelObject(h);
CreateSymbol(name, sym, x, y, z);
WriteLn(name, ': replace symbol"',sym0, '" to symbol"', sym, '".');
end
else begin
WriteLn(name, ': is other symbol"', sym0, '".');
end;
end;
end
else begin
if YNDialog(Concat('"', name, '"', Msg3, LF, Msg4)) then begin
DelObject(h);
CreateSymbol(name, sym, x, y, z);
WriteLn(name, ': replace object(', GetType(h), ') to symbol"', sym, '".');
end
else begin
WriteLn(name, ': is other object(', GetType(h), ')');
end;
end;
end;
ReDraw;
end;
Close(DataFile);
end;
Run(Put3DSymbols);
{
Log file is "Output File" or "Output.txt" in VectorWorks folder.
}[/code]