-
Posts
426 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Everything posted by The Hamma
-
I am curious. I see how the $include command can be used to run a vectorscript sub script but I have a python script that I would like to run as a subroutine in a vectorscript. Can this be done?
-
Recent files - File name display length
The Hamma posted a question in Wishlist - Feature and Content Requests
Because I have to sometimes open backup files the length of the file name display in Recent files is not long enough and the file will appear like below. 12034_Owner Name_Project_Date..... this is problem when there are two in the list but one is backup and the other is not and it looks like this 12034_Owner Name_Project_Date..... 12034_Owner Name_Project_Date..... It would be very helpful if it looked like this so I know that I am not opening the most current version of the file. 12034_Owner Name_Project_Date.vwx 12034_Owner Name_Project_Date-Backup-20220223143437.vwx -
Construction Phasing Data Visualization (Existing, Demo, New, NIC)
The Hamma replied to The Hamma's topic in Python Scripting
My current Record and Scripts. 1 Existing Object.vsm2 Demo Object.vsm3 New Object_Class.vsm4 NIC Object.vsm5 Remove Phase Record.vsm6 New Object.vsm7 Add Phase Record.vsm8-Phase 1.vsm9-Phase 2.vsmRelocate Existing.vsm Status Phase.vwx -
I figured it out. vs.SetPref(1505,True)#enable "Enable legacy 2D features" vs.SetPref(94,True)#enable "Unified View" vs.SetPref(1505,False)#diable "Disable legacy 2D features" Unified View On_2D Leg off.vsm
- 1 reply
-
- 2
-
-
Does anyone know the document preference index number for unified view. Some of my old drawings keep turning off unified view even after "Enable legacy 2D features" is disabled.. I would love to write a script to change the preference since the unified view button is unavailable when "Enable legacy 2D features" is disabled.
-
I have been able to recreate this issue with files that contain references. Either the plan is referenced or the styles are referenced. Also causes havoc with the undo command.
-
I would like Compound Hatches. For example I would like to create a PBU metal panel hatch for a roof or a wall but when I display that hatch at a small scale I would like it to read less dense. So if we could have compound hatches that is one hatch style that contains two different hatches and displays each based on the scale of the viewport. Below is how I would like a PBU hatch to display at different scales. Since most hatches are multi Leveled, maybe Level 1 displays at 1:20 scale and all the hatch Levels display at 1/4" scale.
-
I love that the forum automatically added “2 years later..”!
-
Probably not the issue but check your serial number to see what products are activated. Renderworks should be listed.
-
Vectorworks crashing in DirectX 11 on some Windows systems
The Hamma commented on JuanP's article in Tech Bulletins
I have had many issues with the undo command as well and I think it may have been related to MSI Afterburner and RivaTuner. I have uninstalled them and my undo issues appear to have gone away. -
I uninstalled MSI afterburner and RivaTuner and my undo issues have gone away for the time being.
-
2022 Wall Component wrapping at doors and windows and Wall join bug
The Hamma posted a question in Troubleshooting
In every version of VW 2022 has the following wall component wrapping issue when inserting Doors or Windows in wall that have component wrapping enabled. If you use the Window or Door tool the components won't wrap but if you invoke the command by double clicking the style in the resource browser it will wrap the components. SP-1.1 has the following bug as well. WALL AND WINDOW BUG.vwx -
Perfect, Thanks. Here is a script to import two Text Styles into the current drawing that are stored in: {Workgroup folder or user folder}\Libraries\Defaults\Text Styles\Text Styles.vwx' """ Script to import two text styles into current drawing. Custom scripts can be added to: {Workgroup folder or user folder}\Libraries\Defaults\Text Styles\Text Styles.vwx Modify Style1 or Style2 to import your custom style This Python Script may be freely distributed. No warranty provided. Use at your own risk. David Hamer, 2021 revision 10/21/2021 """ Style1 = 'Callouts 10 pt' #change this to import different text style Style2 = 'Dimensions 10 pt' #change this to import different text style StyleFolder = 'Text Styles' #Name of resource folder to create in current drawing SourceSub = 'Defaults:Text Styles' #Sub path ResType =109 #Text Style type folderIndex =13 #Libraries if vs.GetName(Style1) != []: ResourceList, NumItems = vs.BuildResourceList(ResType, folderIndex, SourceSub) while NumItems != 0: ResourceName = vs.GetNameFromResourceList(ResourceList, NumItems) if ResourceName == Style1: vs.ImportResourceToCurrentFile(ResourceList,NumItems) if vs.GetObject(StyleFolder) == []: vs.NameObject(StyleFolder) vs.BeginFolderN(ResType) vs.EndFolder() vs.SetParent(vs.GetObject(Style1),vs.GetObject(StyleFolder)) NumItems -= 1 if vs.GetName(Style2) != []: ResourceList, NumItems = vs.BuildResourceList(ResType, folderIndex, SourceSub) while NumItems != 0: ResourceName = vs.GetNameFromResourceList(ResourceList, NumItems) if ResourceName == Style2: vs.ImportResourceToCurrentFile(ResourceList,NumItems) if vs.GetObject(StyleFolder) == []: vs.NameObject(StyleFolder) vs.BeginFolderN(ResType) vs.EndFolder() vs.SetParent(vs.GetObject(Style2),vs.GetObject(StyleFolder)) NumItems -= 1
-
Ok, Follow up question. Does anyone know how to set the Document Text Style preference for future text objects to be a particular text style via script? and How to move text styles into a Text Style folder via script?
-
Thanks it is "109"
-
Thanks 109
-
I have looked through the SDK and maybe I am missing it but I can't find the Object Type ID integer for "Text Styles". Anyone know what it is?
-
I have a script that worked great in 2021 but now in 2022 the drawing labels that are updated by the script do not update in the drawing. Any ideas how to get it to refresh. I have tried the obvious refresh, redraw options. """ Imports 'Drawing Label VA - Dwg No. Sht No.' into drawing and replaces other styles with this style 2022 Doesn't refresh plugin. Edit plugin geometry to refresh drawing after running script. David Hamer, 2020 Revised 2021-10-19 """ if vs.GetName('Drawing Label VA - Dwg No. Sht No.') != []: ResourceList, NumItems = vs.BuildResourceList(16, 13, 'Object Styles:Drawing Label') while NumItems != 0: ResourceName = vs.GetNameFromResourceList(ResourceList, NumItems) if ResourceName == 'Drawing Label VA - Dwg No. Sht No.': vs.ImportResourceToCurrentFile(ResourceList,NumItems) if vs.GetObject('Drawing Label Styles') == []: vs.NameObject('Drawing Label Styles') vs.BeginFolder() vs.EndFolder() vs.InsertSymbolInFolder(vs.GetObject('Drawing Label Styles'), vs.GetObject('Drawing Label VA - Dwg No. Sht No.')) NumItems -= 1 def dlupdate(h): if vs.GetPluginStyle(h) != 'Drawing Label VA - Dwg No. Sht No. NTS': if vs.GetPluginStyle(h) != 'Drawing Label VA - Dwg No. Sht No.': #pt= vs.Get2DPt(h,0) #vs.DelObject(h) #vs.Symbol('Drawing Label VA - Dwg No. Sht No.',pt,0) vs.SetPluginStyle(h,'Drawing Label VA - Dwg No. Sht No.') #vs.SetClass(h,'A-ANNO-LABL') vs.ResetObject(h) #vs.ReDrawAll vs.ForEachObject(dlupdate, "(INSYMBOL & INVIEWPORT & (PON='Drawing Label2') & (V))") vs.DSelectAll; test.vwx Drawing Label format.vsm
-
Can you share your working script?
-
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.
-
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?
-
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.
-
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
-
Updated 2022-03-08 ... Added companion script to move selected symbols to a new symbol folder to use as a filter for the Symbol Legend Script. Updated 2021-10-08.... 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 Move Symbol to Folder.vsm
-
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)