Jump to content

Nested Symbol Name field in a Report


Recommended Posts

I have a drawing I am working on with a bunch of symbols made up of other symbols.  I am making a report to show me all the info on the symbols.  Is there any function or way of showing a field that shows what symbol a symbol is in?  

 

For example I have 5 of symbol A and 8 of symbol B put together to make a thing.  I make that thing a symbol and call it symbol Z.

 

I have a report that now shows all the symbols and their record format which is what I am really trying to get out of this.  However they are just all in one big list.  Is it possible to put in a field/column that shows the parent symbol and then summarize by that field/column?

 

Not sure that totally makes sense.

 

Matt

Link to comment

Try this worksheet script. It returns the name of the parent object for each object specified in the database criteria of a database in a worksheet. If the object is on a layer rather than in a container object, the cell says "Object on Layer".

 

Create a new Vectrorscript by copying and pasting everything in the code block below into a new blank script.

 

Run the script in a worksheet by using a column header formula of =RunScript('Name you give the script goes here'). I called this script Get Parent Name to WS.

 

Click the Always button when asked about running the script. The values returned will update when you recalculate the worksheet, not when you make changes in the drawing.

 

Ask again if you need more help.

 

Procedure ParentNameToWS;
{August 22, 2020}
{©2020 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{No Warranty Expressed of Implied. Use at your own risk.}

{Returns the name of the parent object (not a layer) to a worksheet cell.}
{Run usinging a cell formula of =RunScript('ParentNameToWS') if}
{the script is stored in the local file.}


Var	H1:Handle;

Begin
	H1:=GetParent(WSScript_Getobject);
	If GetTypeN(H1)<>31 then
		Begin
			WSScript_SetResStr(GetName(H1));
		End
	Else
		Begin
			WSScript_SetResStr('Symbol on layer');
		End;
End;

Run(ParentNameToWS);

 

  • Like 2
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.

Guest
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...