Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Jose Maria

Edit a symbol in vectorscript

Recommended Posts

Hi folks,

my big question is: is it possible to edit a symbol in vectorscript?

I have a symbol in a wall, that symbol is a custom door, so in the interface I can go to the edit mode, and edit the door params by double clicking.

I would like to modify some of those parameters (door jamb, width and so on) in vectorscript but Im not able to get the door object inside the symbol.

Ive been searching in the forums long time but Im stuck here. Any clue?

thanks in advance.

Jose

Share this post


Link to post

I don't have a VW at the moment, but this should work:

to get the symbol in the wall:

symH:=FIn3D(WallH);

to get the door inside the symbol:

symN:=GetSymName(symH);

doorH:=FInSymDef(GetObject(symN));

Maybe this one will work as well:

doorH:=FInSymDef(symH);

When you have more then 1 object in your wall, you need to loop trough them all with:

symH:=NextObj(symH);

UNTIL symH=NIL;

Best is also to check the type of the object (should be 15 for symbol (or 16 for symbol definition)):

objType:=GetTypeN(symH);

And the same thing when you have more then one object in your symbol:

doorH:=NextObj(doorH);

UNTIL doorH=NIL;

Share this post


Link to post

Yes, that made it!

Dankjewel Maarten :)

This is the resulting code:

symH := FIn3D(wallH);		{ first symbol in the WALL }
while (symH <> nil) do begin
  ObjType := GetTypeN(symH);

  if (ObjType = 15) then begin	{ it's a Symbol }
     symN:=GetSymName(symH);
     objH:=FInSymDef(GetObject(symN));

     {Process window/door/whatever objH}

     end;
  symH  := nextobj(symH );

end;	{ while }

Edited by Jose Maria

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×