Jump to content

The Hamma

Member
  • Posts

    210
  • Joined

  • Last visited

Everything posted by The Hamma

  1. I was having Undo problems in 2021 also. Now I’m continuing to have those same problems in 2022. Most of the time it has to do with relocating walls or symbols within the walls that cause the undo to break.
  2. Ok next issue. I can make two options work with the YES@CONDITION:NO . But when I try to divide space number field with a number that I placed in the user field it only displays it displays it as text. Input #Space#.#Area##doc area_3_0#/#Space#.#11_User-Def Info 2# or #Space#.#Area##doc area_3_0#/#Space#.#11_User-Def Info 2##VAL# or #Space#.#Area##doc area_3_0#/#Space#.#11_User-Def Info 2##INT# Output 100/15 instead of 6.66 How do I force the tag to read #Space#.#11_User-Def Info 2# as a number rather than text?
  3. OK I got the @ outcomes to work but it only works with two options. I was hoping the “if” function would work so I could evaluate three options.
  4. I cannot get an IF expression to work in the Data Tag. What am I doing wrong? I am working with a Data Tag linked to a Space and and I tried the example directly from the help guide and it does not work. It only prints the formula in the tag. From the help guide
  5. Updated.... re-download script if you download it prior. Thanks to @michaelk for figuring out how to make Data tags appear in my schedule and for helping me with the textstyle. Here is my go at the plugin version of a symbol legend. Unlike @michaelk my script does not provide headers for the columns so if you need that try his version. This legend was created using "Tags" as a description, "Test Folder" as the source resource folder and since the symbols are inserted alphabetically I added a number in front of the name of each symbol in the drawing to determine the order that they were inserted in. If the filter fields are populated tool will use the filter. If the checkboxes are checked the tool will exclude items filtered. If text style "SymLegendTS" doesn't exist it will be created. Modify this style to change the text style of the labels. PIO can be exploded and manually adjusted. each symbol and description are in individual groups. I you try it out and find any issues please let me know. Symbol Legend.vso
  6. I have the handle to a symbol and I would like to create a separate group of a copy of the 2D symbol objects that can be inserted into the drawing with a plugin object script but I cannot get it to work. h5 = handle to symbol This works. I had to double vs.FInSymDef vs.BeginGroup() vs.Locus(0,0) vs.EndGroup gr1 = vs.LNewObj() h7 = vs.FInSymDef(vs.FInSymDef(h5)) while h7 != []: vs.CreateDuplicateObjN(h7,gr1,True) h7 = vs.NextObj(h7)
  7. I simplified the script to the following. It appears to be something with it being a point object plugin tool and not when it is run as a simple script as it works as a script but not as a plugin object. To my knowledge it appears to only be an issue with tag objects. h1 =vs.FSymDef() while h1 != []: vs.Symbol(vs.GetSDName(h1),0,0,0) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: if vs.GetTypeN(h2) == 16: vs.Symbol(vs.GetSDName(h2),0,0,0) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1)
  8. I have written a script and created a "Symbol Legend (custom plugin)" tool. It works great except for one issue. When the symbol is a data tag the symbol the tag symbol does not appear. If I explode the plugin the symbol appears. This only happens when there is a description to type on the screen or if there is a second symbol in the resource browser. If there is no description the tag does appear. Tag is the only symbol in the drawing Tag and Watercloset symbol are in drawing. VSO attached. """ This script inserts all of the symbols in the current drawing resource manager into the drawing with the text in Record "Legend Record" and field "Legend Text" if assigned to a symbol. It ignores symbols with the record but no text in the "Legend Text" Field. First run will create "Legend Record" if it does not exist. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 10/4/2021 """ xP = yP = p4y = p5y = 0 def name(h): global nameSY if vs.PDescription == 'Tag': if notag == False: tagarray = vs.GetResourceTags(h) nameSY = (tagarray[0]) else: nameSY = '' if vs.PDescription == 'Symbol Name': nameSY = (vs.GetSDName(h)) if vs.PDescription == 'Record': nameSY = vs.GetRField(h,'Legend Record','Legend Text') def EvaluateSym(h): if vs.PExclude == True: if vs.GetName(vs.GetParent(h1)) != vs.PSymbolFolder: appendtolist(h) else: appendtolist(h) def appendtolist(h): if vs.PRecordName == '': hSEL.append(h) else: if vs.PRecordExclude == True: if vs.Eval(h, "(R IN ['"+vs.PRecordName+"'])") != True: hSEL.append(h) else: if vs.PRecordExclude == False: if vs.Eval(h, "(R IN ['"+vs.PRecordName+"'])") == True: hSEL.append(h) def DoIt(h5): global xP,yP,p4y,p5y,p3x,p3y,p2x,p1y h6 = h5 (p1,p2) = vs.GetBBox(h5) p1x=p1[0] p1y=p1[1] p2x=p2[0] p2y=p2[1] p3x = p2x-p1x p3y = p1y-p2y p5y = p4y+p1y-((p3y/2)+p1y) vs.Symbol(vs.GetSDName(h),xP+((p3x/2)-p2x),p4y-p1y,0) vs.TextOrigin(xP+vs.PControlPoint01X,p5y) vs.TextSize(vs.PTextsize) vs.TextVerticalAlign(3) vs.TextFont('Arial') name(h5) vs.CreateText(nameSY.upper()) p4y -= p3y + vs.PSymbolSpacing if vs.GetObject('Legend Record') == (): # Creates "Status and Phase" record if not present vs.NewField('Legend Record', 'Legend Text', '', 4, 0) hSEL = [] if vs.PSymbolFolder != '': if vs.PExclude == False: h1 = vs.FInFolder(vs.GetObject(vs.PSymbolFolder)) else: h1 =vs.FSymDef() else: h1 =vs.FSymDef() while h1 != []: EvaluateSym(h1) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: if vs.GetName(vs.GetParent(h2)) != vs.PSymbolFolder: EvaluateSym(h2) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1) for h in hSEL: if vs.GetTypeN(h) == 16: if vs.PDescription == 'Tag': tagarray = vs.GetResourceTags(h) if tagarray: notag = False DoIt(h) else: notag = True DoIt(h) else: DoIt(h) Symbol Legend.vso
  9. I have a script that I’m working on and I would like to display the coordinates of points but when I try to convert the points to string it says it’s a tuple not a number. many ideas i tried: print(p1) and vs.num2str(p1)
  10. Updated to center symbols and added tag script. I updated the script to center the symbols and center the text on the symbol. Also I added a second script to use a record rather than the symbol name. You will have to assign the "Legend Record" to the symbol in the resource manager and give it a name in "Legend Text" Field. Record will be created on first run if it does not exist. Sample file attached. "Create Symbol Legend" script - uses Symbol Names """ This script inserts all of the symbols in the current drawing resource manager into the drawing with the symbol name. Symbol and text are in an individual group. Use the distribute command to space them evenly after creation. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 09/30/2021 """ xP = yP = 0 def DoIt(h5): global xP,yP vs.BeginGroup() (p1,p2) = vs.GetBBox(h5) p1x=p1[0] p1y=p1[1] p2x=p2[0] p2y=p2[1] p3x = p2x-p1x p3y = p1y-p2y vs.Symbol(vs.GetSDName(h5),xP+((p3x/2)-p2x),yP+((p3y/2)-p1y),0) vs.TextOrigin(xP+40,yP) vs.TextSize(9) vs.TextVerticalAlign(3) vs.TextFont('Arial') vs.CreateText(vs.GetSDName(h5)) vs.DoMenuTextByName('UPPER CASE',0) vs.EndGroup() yP -= 25 hSEL = [] h1 =vs.FSymDef() while h1 != []: hSEL.append(h1) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: hSEL.append(h2) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1) for h in hSEL: if vs.GetTypeN(h) == 16: DoIt(h) "Create Symbol Legend (Record)" script - uses "Legend Record" Record """ This script inserts all of the symbols in the current drawing resource manager into the drawing with the text in Record "Legend Record" and field "Legend Text" if assigned to a symbol. It ignores symbols with the record but no text in the "Legend Text" Field. Symbol and text are in an individual group. Use the distribute command to space them evenly after creation. First run will create "Legend Record" if it does not exist. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 09/29/2021 """ xP = yP = 0 def DoIt(h5): global xP,yP vs.BeginGroup() (p1,p2) = vs.GetBBox(h5) p1x=p1[0] p1y=p1[1] p2x=p2[0] p2y=p2[1] p3x = p2x-p1x p3y = p1y-p2y vs.Symbol(vs.GetSDName(h5),xP+((p3x/2)-p2x),yP+((p3y/2)-p1y),0) vs.TextOrigin(xP+40,yP) vs.TextSize(9) vs.TextVerticalAlign(3) vs.TextFont('Arial') vs.CreateText(vs.GetRField(h5,'Legend Record','Legend Text')) vs.DoMenuTextByName('UPPER CASE',0) vs.EndGroup() yP -= 25 if vs.GetObject('Legend Record') == (): # Creates "Status and Phase" record if not present vs.NewField('Legend Record', 'Legend Text', '', 4, 0) hSEL = [] h1 =vs.FSymDef() while h1 != []: hSEL.append(h1) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: hSEL.append(h2) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1) for h in hSEL: if vs.GetTypeN(h) == 16: if vs.GetRField(h,'Legend Record','Legend Text') != '': DoIt(h) "Create Symbol Legend (Tag)" script - uses "Tag" """ This script inserts all of the symbols in the current drawing resource manager into the drawing with the text in Record "Legend Record" and field "Legend Text" if assigned to a symbol. It ignores symbols with the record but no text in the "Legend Text" Field. Symbol and text are in an individual group. Use the distribute command to space them evenly after creation. First run will create "Legend Record" if it does not exist. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 09/29/2021 """ xP = yP = 0 def DoIt(h5): global xP,yP vs.BeginGroup() (p1,p2) = vs.GetBBox(h5) p1x=p1[0] p1y=p1[1] p2x=p2[0] p2y=p2[1] p3x = p2x-p1x p3y = p1y-p2y vs.Symbol(vs.GetSDName(h5),xP+((p3x/2)-p2x),yP+((p3y/2)-p1y),0) vs.TextOrigin(xP+40,yP) vs.TextSize(9) vs.TextVerticalAlign(3) vs.TextFont('Arial') tagarray = vs.GetResourceTags(h) vs.CreateText(tagarray[0]) vs.DoMenuTextByName('UPPER CASE',0) vs.EndGroup() yP -= 25 hSEL = [] h1 =vs.FSymDef() while h1 != []: hSEL.append(h1) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: hSEL.append(h2) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1) for h in hSEL: if vs.GetTypeN(h) == 16: tagarray = vs.GetResourceTags(h) if tagarray: DoIt(h) Legend Creator.vwx
  11. Try this. Not a schedule but this script works for me. The symbols are placed close together but after the legend is created I move the last group down and use the distribute command. File attached. """ This script inserts all of the symbols in the current drawing resource manager into the drawing with the symbol name. Symbol and text are in an individual group. Use the distribute command to space them evenly after creation. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 09/29/2021 """ ecnt = reset = xP = yP = vcnt = ocnt =scnt= mcnt= pcnt = 0 def DoIt(h5): global xP,yP SymName = vs.GetSDName(h5) vs.BeginGroup() vs.Symbol(vs.GetSDName(h5),xP,yP,0) vs.TextOrigin(xP+50,yP) vs.TextSize(9) vs.TextFont('Arial') vs.CreateText(SymName) vs.DoMenuTextByName('UPPER CASE',0) vs.EndGroup() yP -= 25 hSEL = [] h1 =vs.FSymDef() while h1 != []: hSEL.append(h1) if vs.GetTypeN(h1) == 92: h2 = vs.FInGroup(h1) while h2 != []: hSEL.append(h2) h2 = vs.NextObj(h2) h1 = vs.NextObj(h1) for h in hSEL: if vs.GetTypeN(h) == 16: DoIt(h) Legend Creator.vwx
  12. I wrote a simple python script that may help. """ This script will change any screen plane object in the drawing to Layer Plane. Once run you can disable "enable legacy 2D features" on the "2D legacy mode" tab in document settings. Notes: 1. Some objects may move to the 3D plane and not the Layer Plane. 2. You will also have to run this script on any referenced files first. This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 09-23-2021 """ def assign(h): vs.SetObjectVariableBoolean(h,1160,False) vs.ForEachObject(assign,"(INVIEWPORT & (PLA='Screen Plane'))") Script Screen Plane to Layer Plane.vwx
  13. I would like to have the option to set my naming scheme as default.
  14. I have been able to modify the "...\Plug-Ins\Common\Data\PubliemNames.xml" to move my options to the top of the list but is there any way to make mine default. It always defaults to "Sheet#-Sheet Title". Even if I delete it from the list my option is not default.
  15. With these mew advancements in the VGM will Vectorworks run faster on a Mac than a PC or are the advantages equal?
  16. Please add a don't show this again check box on the following messages when using the Eyedropper and Data Visualization. or Maybe a suppress messages for the rest of the drawing session. "Object has Data Visualization attribute overrides applied. but the original attributes will be picked up." and "Transferred attributes may be hidden by the active Data Visualization" To many ok's to click..
  17. Thank you this works great!!!
  18. Is there a script command to open the edit class dialog box. I would like to be able to edit the currently active class or a selected object's class without having to search the long list of classes in the class list.
  19. I am looking for a lidar scanner that I can mount on a tripod and scan a space with ease. Typically the spaces are not very large but I want something with decent range, accuracy and no monthly fee to export to Vectorworks. I have been using my iPhone 12 mounted to a tripod and it does not have quite enough range or accuracy. Please give me your recommendations.
  20. Data Visualization should be able to set the line weight without changing the line type.
  21. That’s cool but I wish you could tag symbols from outside the symbol.
  22. This is what I get when I open the document. Try closing and reopening the document. or restarting vectorworks or your computer Also about the reveals. The door appears to have some sort of header. It won't let me edit your door object.
  23. I recommend using classes to define the data visualization of the doors and window in sections. See attached. Multiple Data visualization_Renovation.vwx
×
×
  • Create New...