Jump to content
Andrew ResX

Report displaying multiple classes within aysmbol

Recommended Posts

Probably, but we need a lot more detail about what you are trying to do to make any good recommendations. More detail is better in asking for help.

Share this post


Link to post

Hi Pat,

I have a symbol library of approximately of 300 Hybrid Symbols. Over time updates have been made to the symbol library, and in some cases, classes have been changed to the 2d part of the symbol but not the 3d, resulting in multiple classes with in the symbol. Essentially it's a tidy up exercise, and having a document that displays all classes within each symbol will make the task of tidying up far easier, rather than delving into each symbol and checking both the 2d and 3d components.

Share this post


Link to post

I think we can generate a report that will list the multiple classes, but you won't be able to change the classes from the worksheet.

 

In order to change the classes you have to edit the symbol definition. Worksheets can't access the definition, only the symbol instance.

 

And if you are actually in VW2012, I think you are basically out of luck. If you are in VW2020 there is a new Database by Script option that MIGHT make it possible to do this.

 

But definitely not tonight. Any maybe not ever :-(

Share this post


Link to post

Thanks Pat,

 

FYI I am running the latest Version of VW, that being 2020 SP3.1

 

Would have been nice to have been able to update from a worksheet, but I guessed there was little chance of that.

 

I'll look further into your suggestion. Sometimes it's just a matter of knowing where to begin.

 

Cheers

 

 

 

Share this post


Link to post

Here is the basics of what I am thinking.

Place at least one instance of each symbol in the drawing.

Create a script to be called by the DatabaseByScript command in the worksheet. The DatabaseByScript command basically lets you specify which objects in the drawing will be in the database by using the WSScript_AddHandle command.

Get a handle to the first symbol. Stick that into the database.

Get a handle to the symbolDef (GetObject(GetName(ThisSymbol))

Get a handle to the first object in the symbol (FinSymbolDef)

Stick that handle into the database

Repeat for each object in the symbol

Repeat for each symbol in the drawing.

 

If the objects in the Symbol Definition don't show up, then you have to dig into the symbol instances instead.

 

I would set a column for the symbol name, the object type, and the class of the object.

 

You probably don't want to deal with the recursion necessary to deal with nested symbols. Just place them and handle them individually.

 

If you don't get anywhere I will try to make some time this weekend. I need to play with DatabaseByScript commands anyway. ;-)

Share this post


Link to post

Thanks for this Pat, this is Fantastic.

I reckon I'm about 70% there, but I haven't done much with Script Editing in VW, and it's taking sometime to find the appropriate Topics, procedures/functions.

Let me  know if you have any further luck.

Cheers

Share this post


Link to post

For an example of the DatabaseByScript check out:

 

Applications:Vectorworks 2020:Libraries:Defaults:Reports_Schedules:Landmark Schedules:SaveLandscapeAreaBeforePlants.py

 

Not very well commented, but it is a pretty short script and may help.

 

Ask again if you need more help.

Share this post


Link to post

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.


 

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.

×
×
  • Create New...