Jump to content

brvn

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation

1 Neutral

Personal Information

  • Location
    Switzerland

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Thanks for this neat solution. I have noticed that vw doesn't throw actual error, but thought I'm dealing with it later. I got the vs.CreateDuplicateObject function working as following vs.CreateDuplicateObject(h, vs.GetParent(h))
  2. I am trying to duplicate two Worksheets, place them on a Layer and move it to the right worksheet folder. I got it all working, except that the worksheets seem like they are not saved correct. If I want to activate the placed worksheet image in the resource manager, it doesn't work. Does someone have some experience ? Thank you very much # Script by Lukas Tobler | 27.04.2023 # Platziert die Tabellen automatisch auf allen Raumstudien und filtert den korrekten Raum import vs criteria_point = "(NOTINDLVP & NOTINREFDLVP & ((T=LOCUS) & (C='Hilfskonstruktionen')))" def create_tab_definition(handle_ref_tab, story): try: vs.NameObject(f"RST_{story}") folder_handle = vs.BeginFolderN(18) ws_handle = vs.CreateDuplicateObject(handle_ref_tab, folder_handle) vs.EndFolder() return ws_handle except: folder_handle = vs.GetObject(f"RST_{story}") ws_handle = vs.CreateDuplicateObject(handle_ref_tab, folder_handle) return ws_handle # Pro Geschoss (UG04-OG04) einen Ordner erstellen mit dem Namen "RST_Geschoss" (zb "RST_UG03") # Falls Ordner schon vorhanden, dann den Handle von diesem Ordner wiedergeben # Kopie von Tabelle "Vorlage Räume" oder "Vorlage Türen" erstellen und im Ordner speichern def main(point_handle): layer_handle = vs.GetLayer(point_handle) layer_name = vs.GetLName(layer_handle) if "RST" in layer_name: def get_ttb(h): global ttb_handle ttb_handle = h vs.Layer(layer_name) vs.ForEachObject(get_ttb, "((PON='Title Block Border') & (L='"+layer_name+"'))") story = layer_name[19:23] record_handle = vs.GetRecord(ttb_handle, 2) ttb_field = vs.GetRField(ttb_handle, record_handle.name, "Sheet Title") seperator_index = ttb_field.find(" /") room_number = ttb_field[:seperator_index] insertion_point = vs.Get2DPt(point_handle, 1) handle_ref_tab = vs.GetTopVisibleWS() if handle_ref_tab.name == "Vorlage Räume": new_tab = create_tab_definition(handle_ref_tab, story) vs.SetWSCellFormulaN(new_tab, 1, 2, 1, 2, room_number) vs.CreateWSImage(new_tab, insertion_point) vs.SetName(new_tab, room_number) else: new_tab= create_tab_definition(handle_ref_tab, story) insertion_point = (insertion_point[0], insertion_point[1]-0.185) vs.SetWSCellFormulaN(new_tab, 1, 2, 1, 2, room_number) vs.CreateWSImage(new_tab, insertion_point) vs.SetName(new_tab, f"{room_number}_Türen") vs.ForEachObject(main, criteria_point)
  3. So I have a pretty similar problem at the moment. I want to edit an existing record with Pup Up menus. Its still not possible to do so ?
×
×
  • Create New...