but unfortunately can not see what ist the output.
We tried to find a Solution to List all our current Worksheet in some kind of Meta-Worksheet.
The Python Script should iterate these objects and we would like to process the results within the RunScript Worksheet-Function but without success so far 😐:
def list_all_tables():# Eine leere Liste, um die Handles aller gefundenen Tabellen zu speichern
table_handles =[]# Erste Objekt im Dokument
h = vs.FActLayer()# Durch alle Objekte im Dokument iterierenwhile h != vs.Handle(0):# Überprüfen, ob das aktuelle Objekt eine Tabelle (Worksheet) istif vs.GetTypeN(h)==47:# 47 ist der Objekttyp für Worksheets in Vectorworks# Das Handle der Tabelle zur Liste hinzufügen
table_handles.append(h)# Zum nächsten Objekt übergehen
h = vs.NextObj(h)# Alle gefundenen Tabellenhandles an die Tabellenschnittstelle übergebenfor id, h in enumerate(table_handles, start=1):
vs.WSScript_AddHandleId(h, id)# Die Funktion aufrufen, um alle Tabellen aufzulisten
list_all_tables()
We would be very grateful for any tips or information 😃
Vectorworks Worksheets Reference flexible (VW-24 Landscape)
in Python Scripting
Posted
Hello,
we are trying to find a way with Pythenscript to Refrence VW-Worksheets a bit flexibel.
We are having different Worksheets.
We want to Refence one Worksheet with another Worksheet and trying to find out a way that Worksheetname for Reference can be flexible.
At the moment with VW-Ref Function, the Worksheetname ist fixed and needs tobe changed if the Worksheetname has been updated.
We also try to Run Python-Script in Vectorworks but not able to find out a way, how to retrive a PS result in a Worksheet.
We are using this Function:
=DATENBANKDURCHSCRIPT(120; 'Landschaft/Script.py')
but unfortunately can not see what ist the output.
We tried to find a Solution to List all our current Worksheet in some kind of Meta-Worksheet.
The Python Script should iterate these objects and we would like to process the results within the RunScript Worksheet-Function but without success so far 😐:
We would be very grateful for any tips or information 😃