Jump to content

Jiajing

Member
  • Posts

    102
  • Joined

  • Last visited

Everything posted by Jiajing

  1. @Kars Keizer Lighting Device and lighting pipe are both showing as 86, which is plug in object, is there a way to identify them seperatly, for instance lighitng device as light, not a plug in object
  2. @klinzey is there a way I can read the parameter name by script. For instance, I change 'USER FIELD 1' name to 'PROJECT', is there a way I can read 'PROJECT' via script?
  3. New stuff everyday. I had a python based script running just fine on 2022. once I am on 2023 SP3, the radio button is strange for me. It supposes to only allow me to select one radio botton, however I can select multiple ones for some reason. also that only happens on WINDOWS , MAC works just fine. I am on WINDOWS 11. Dia Builder test file.vwx
  4. @Boh It is , thank you. Interesting thing is when using python to fetch that value via scripting, the criteria is GetRField(h,"Callout","__NoteDescrip") it is ""__NoteDescrip"', not " Text"
  5. @Pat Stanford Thank you. General Notes is really different than Callout. GN_Hand=vs.FSActLayer(); PG_Hand= vs.GetCustomObjectProfileGroup(GN_Hand); h=vs.FInGroup(PG_Hand); Text = vs.GetRField(h,"NNA_GeneralNotes","Text")
  6. @Boh what is the criteria to get access to the TEXT in call out, I am having hard time to find that on worksheet
  7. What is the criteria to get access to discription (the text) of a general notes. Following seems doesn't work GetRField(h,"General Notes","__NoteDescrip")
  8. Is there a way I can check if Data Viz is active in doc and if it doesn't, make it active? @The Hamma @Pat Stanford
  9. Here is the script to remove legends from all viewports ##This script remove data visualization legend from all view ports on all sheet layers ## Created by Jiajing Qi, Tested: VWX2023 SP1, 01/03/2023 ## Use it on your own risk import vs; global i i = 0 vs.Message("This script removed data visualization legend from all view ports on all sheet layers.") # collect handles of selected VPs on active layer def GetHandle(h): if vs.GetObjectVariableInt(vs.GetLayer(h), 154) == 2: if vs.GetTypeN(h) == 122: hVP.append(h) hVP = [] vs.ForEachObjectInLayer(GetHandle, 0, 2, 1) # Traverse into the annotations group of selected VPs and delete Data Visualization Legend for VP in hVP: anno = vs.GetVPGroup(VP, 2) h = vs.FInGroup(anno) objs = [h] h = vs.NextObj(h) while h != vs.Handle(0): if vs.GetObjectVariableString(h, 1166) == "Data Visualization Legend": vs.DelObject(h) vs.UpdateVP(h) i = i + 1 h = vs.NextObj(h) if i > 1: vs.AlrtDialog(f"Removed {i} data visualization legends") else: vs.AlrtDialog(f"Removed {i} data visualization legend")
  10. Here is the script to remove legends from all viewports. ##This script remove data visualization legend from all view ports on all sheet layers ## Created by Jiajing Qi, Tested: VWX2023 SP1, 01/03/2023 ## Use it on your own risk import vs; global i i = 0 vs.Message("This script removed data visualization legend from all view ports on all sheet layers.") # collect handles of selected VPs on active layer def GetHandle(h): if vs.GetObjectVariableInt(vs.GetLayer(h), 154) == 2: if vs.GetTypeN(h) == 122: hVP.append(h) hVP = [] vs.ForEachObjectInLayer(GetHandle, 0, 2, 1) # Traverse into the annotations group of selected VPs and delete Data Visualization Legend for VP in hVP: anno = vs.GetVPGroup(VP, 2) h = vs.FInGroup(anno) objs = [h] h = vs.NextObj(h) while h != vs.Handle(0): if vs.GetObjectVariableString(h, 1166) == "Data Visualization Legend": vs.DelObject(h) vs.UpdateVP(h) i = i + 1 h = vs.NextObj(h) if i > 1: vs.AlrtDialog(f"Removed {i} data visualization legends") else: vs.AlrtDialog(f"Removed {i} data visualization legend")
  11. @Jesse Cogswell I even didn't know it exsits locally. Thank you for the info
  12. The first link is what I was missing. Thank you Edit: I still can not find what is 1166 for in both links @The Hamma
  13. @The Hamma Thank you for the code, it is very helpful. Circling back to it, I am having hard to find those INDEXes from Appendix, for instance, not sure 1166 means in GetObjectVariableString, is there a doc with full list of index.
  14. Building a Dialog with TextPopup, and I have PRESENTATION VALUES with that textpop. However, after exporting to python, how would I still retian those values. I notice those info are included in the section of 'XML defintion of the layout' . how would the main dialog code retreive data from 'XML defintion of the layout' Thank you
  15. Hi @Nikolay Zhelyazkov I understand your concern. As an option definitly helps. Inspired by data tages, what if we change UPDATE SHEET to 'LINKED VIEWPORT SCALE', just as what we have on REFERENCE MARKER, It is a popup, but it shows scales of each viewports on SELECTED SHEET from TBManager. The EDIT TEXTBOX stays as it is in case we need to note scale as 'NOT TO SCALE' Not sure if there is technical difficulty on this request, but it would defenitely save my clicks and brain.
  16. Hi @Nikolay Zhelyazkov Circle back to UPDATE SCALE on title block , would it be possible to have it look at a specific viewport. The reason I ask is because normally I have mutiple viewpoints on one sheet (The Key / The notes) . It would be great that VWX has a popup with all viewports on that sheetlayer, then I select the a viewport from the popup, the scale of that selected viewport becomes the scale showing on title block. In that way, it is more flexiable and also faster to update scale.
  17. I am on VWX2022 SP3, I am having a issue with class popup at object info. Basically, the class info never got updated after assigning new class ,even object has been assigned to new class. I attached a screen recording for clarity. It's not a specific file issue as it happens with new file too. Tried start program, no lucky on that. Any insights? Screen Recording 2022-04-21 at 10.52.21.mov
  18. I am trying to get handles for lable legend components , I would love to adjust lable legend's positions by exact value if that is possible. For instance, move CHANNEL NUMBER +5" from its current position. For fun, I did try H: = FIn3D(H) to change objects attributes inside PIO, it does get discard when reset objects. Learned from @Jesse Cogswell I could use FInGroup to travers throught objects inside PIO
  19. @PatStanford import vs; vs.SelectObj("INOBJECT & (S='Light Instr ETC Source 4 LED Studio HD 10deg')"); It does not work on script, but when I create that criteria using CUSTOME SELECTION, in that dialogue it does show number of symbols match that criteria. However, it just does not work by simply running the pure script. Circle back to @Jesse Cogswell original post, I ended up using ('Lighting Device'.'Symbol Name'={LightSymbolName}) # fstring here That works great. Always learning. Thank you
  20. @PatStanfordI am defenitely learning coding. I would love to traverse throught all objects inside lighting symbol and change their attributes to start, the reason I wasn't able to do that by SETCLASS simply becasue customized symbol libraries may not well maintained and objects could be assigned to mutiple classes, which is not easy to keep track on. @Jesse Cogswell Really appreciate on pointing me to the right direction. Good to know VWX is using FInGroup to reach inside lighting symbol, that is a huge help. One thing I do notice is that following criteria doesn't necessary work on VW2022 SP3 for some reason. import vs; vs.SelectObj("INOBJECT & (S='Light Instr ETC Source 4 LED Studio HD 10deg')"); The above script should select 10deg leko in the document, but it doesn't. I am working on find alternative criteria to RESETOBJECT.
  21. HI Pat, I am trying to go into the lighitng symbol, change geometry attributes and apply that changes to all instance in the drawing. any leads are appreciated.
  22. Hi Raymond, What if i need individual object, not changing color by class. Could not locate a right fuction to Traver objects inside lighting symbol geometry. Seems like EACHOBJECTINLIST doesn't wotk, anything I am missing? Thank you in advance
  23. Hi, I am trying to figure out those strings, would you guide me what is the best way to find those legend points? Thank you
×
×
  • Create New...