Andrew ResX Posted June 18, 2020 Share Posted June 18, 2020 Any one know if it is possible to create a Report that lists Multiple classes with a symbol? Quote Link to comment
Pat Stanford Posted June 18, 2020 Share Posted June 18, 2020 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. Quote Link to comment
Andrew ResX Posted June 19, 2020 Author Share Posted June 19, 2020 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. Quote Link to comment
Pat Stanford Posted June 19, 2020 Share Posted June 19, 2020 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 :-( Quote Link to comment
Andrew ResX Posted June 19, 2020 Author Share Posted June 19, 2020 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 Quote Link to comment
Pat Stanford Posted June 19, 2020 Share Posted June 19, 2020 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. ;-) Quote Link to comment
Andrew ResX Posted June 19, 2020 Author Share Posted June 19, 2020 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 Quote Link to comment
Pat Stanford Posted June 19, 2020 Share Posted June 19, 2020 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. Quote Link to comment
Andrew ResX Posted June 21, 2020 Author Share Posted June 21, 2020 Nice one, thanks Pat Quote Link to comment
Recommended Posts
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.