Jump to content
Developer Wiki and Function Reference Links ×

Insert Symbol and Assign it to a Layer

Recommended Posts

Hi Everyone,


Can someone please give me an example on how to create a script to insert a symbol at a specific location and place it on a specified layer? I am trying to automate common symbols I place on drawings and having them auto allocate to their layers.


In this example I am trying to place a table symbol at 0'-0", 0'-0", 0'-0" on the "Staging" layer and a lighting console symbol inserted as a lighting device at 0'-0", -8'6 1/2", 3'7 3/8" on the "Lighting" layer.


Any help would be appreciated.


Thank you,


Edited by MTRobin
Link to comment


Symbol('Table', 0, 0, 0);  Where the third zero is the rotation.



Symbol('Console', 0, 8' 6.5", 0);

Move3DObj(LNewObj, 0, 0, 3'7.375");


I don't know how to make it a lighting device.  Since there are no variables you should be OK to run the above as is. If you expand to need variables then you need all of the procedure statements and Begin/End functionality.


Ask again for more help.

Link to comment

@MTRobin - sounds like you are on a similar journey to me - good luck!


@Pat StanfordWhen it comes to inserting 'things' and manipulating them - how does the script know where to get the thing (in this case a symbol) from?


Does it need to already be a resource within the file, or will VW search for the symbol in the resource library, which then begs the question what if it doesn't exist, or if there are duplicates (but I will skip that for now).





Link to comment

If you want to insert a symbol, it either has to be in the existing file or you have to go to an entirely different level of complexity to find the resource in a different file and import it into the existing file prior to inserting.


You might be able to insert a referenced symbol, but I think that would be an even higher level of complexity.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...