Jump to content

The Hamma

Member
  • Posts

    360
  • Joined

  • Last visited

Everything posted by The Hamma

  1. It appears that the records in the symbols are not converting the units correctly when the drawing is converted to mm. I have to multiply every unit by 304.8 which is feet to mm factor. Let me see what I can do.
  2. Updated 07-17-2023: One of the rails was not using the class attributes. This error has been corrected. If you downloaded it prior please download it again. Only "Picket Fence.vso" has changed. Attached is a Picket Fence Tool that I created for Vectorworks. Read the readme files for placing the files in the correct location. Most variables are controled by the picket record which is attached to the picket symbol and the post record that is attached to the post. important: it only reads the record that is attached to the symbol as it appears in the resource manager. It does not read the record of symbol as it appears in the drawing. You can edit those records from the Resource Manger or by going into the symbol to edit it. Note that you must not have anything selected to edit the record when inside the symbol. Picket appearance is controlled by class settings L-FENC-PCKT Post appearance is controlled by class settings L-FENC-POST Plug-in has no warranty use at your own risk. David Hamer 2023-07-12 When adding new picket and post styles I recommend duplicating a similar symbol. Edge pickets are centered on the back edge of the picket where centered pickets are centered on the center of the picket. The post symbol is declared by the picket record. Post symbols can be modified to extend below the ground plane if needed to be. Picket record Post Record Wood picket fences Metal Picket fences Chain Link Fences Pickets Fence V2023 V2.zip
  3. @C Beard glad it’s working and glad to be of service!
  4. Thanks for the help. Final tool here.
  5. Got it, Thanks. It would have been easier to find if it were Num2StrValid, LOL!
  6. I have a Number(Dimension) record attached to a symbol. When I use GetRField to get the value of that dimension it returns a STRING. The value is ( 4" ). When I use Str2Num that value becomes 0. Is there a way to convert STRING Dimensions into REAL numbers? If I use General Number format it works fine but then I have to keep all my units in inches rather than feet and inches. Also I would like to let it use Document Units so I don't think looking for the ' or " unit mark would be helpful.
  7. @C Beard I have a Synology Diskstation and I found that it not wise to link Vectorworks to the Workgroup folder on a shared synology drive. There are some issues with adding resources to the files when they are being linked this way. The best way to do this is to use Synology Drive and create a synced copy of the workgroup folder on your local computer. You can also put uncategorized files in the Synced copy of the workgroup {Favorites} folder. I store everything in our workgroup folder. I also store my keynote libraries and some other settings in the workgroup folder but Vectorworks only looks in the user folder for these items so I create a sybmolic link to those folders to my user folder. Below are the command lines that create them. I have my User directory located in my "Documents" folder rather than my %appdata% folder. The " The {C:\Users\David Hamer\Documents\VWUser} need to be edited to the path of the local user's VW User directory and the {D:\VWWorkgroup\} need to be edited to the Synology Drive synced directory. These commands need to be executed at the CMD prompt with Adminstrator rights. rmdir "C:\Users\David Hamer\Documents\VWUser\2023\Libraries\Defaults\Notes" mklink /D "C:\Users\David Hamer\Documents\VWUser\2023\Libraries\Defaults\Notes" "D:\VWWorkgroup\2023\Libraries\Defaults\Notes" mkdir "C:\Users\David Hamer\Documents\VWUser\2023\Settings\Select Similar" mklink /D "C:\Users\David Hamer\Documents\VWUser\2023\Settings\Select Similar\Saved Settings" "D:\VWWorkgroup\2023\Settings\Select Similar\Saved Settings" del "C:\Users\David Hamer\Documents\VWUser\2023\Settings\Eyedropper Tool" mklink /D "C:\Users\David Hamer\Documents\VWUser\2023\Settings\Eyedropper Tool" "D:\VWWorkgroup\2023\Settings\Eyedropper Tool" Copy "D:\VWWorkgroup\2023\Plug-ins\Common\Data\PubliemNames.xml" "C:\Users\David Hamer\Documents\VWUser\2023\Plug-ins\Common\Data\PubliemNames.xml" mklink /d "C:\Users\David Hamer\Documents\VWUser\2023\Settings\DWG_DXF\Export" "D:\VWWorkgroup\2023\Settings\DWG_DXF\Export" Also looking at your path it seems very long. Windows has a file name and path limit of ~256 characters. So if the file name and path exceed this limit Windows cannot write to that file.
  8. I added the "Pickets" folder to my library. I have a resource library file that needs to be added to that directory for my script to pull symbols from. For experimental purposes I changed it to 'Defaults:Railing Fence' and it worked. Strange!
  9. Sorry, yes it is a Plug-in Object and the parameters are defined. It's very odd. Never had that happen before I was working with the three samples attached to this thread.
  10. When I edit line 106 resList:=BuildResourceList(nResType,13,'Defaults:Railing Fence:Pickets',numItems); AlrtDialog(concat(numItems)); The numItems = 43 but only one symbol shows up in the picker. Not sure what you are doing with the parents but is it restricting the view to only the root of the current drawing? Also get this error almost everytime I edit the script. I have to restart Vectorworks everytime I get the error.
  11. Jesse: Thanks, I do want to see the current drawing as well as the symbols at 'Defaults:Railing Fence:Pickets'. I am only trying to filter out the rest. I am able to build the resource list. Would there be another way to just pick a symbol from the resource list? Currently in my scripts OIP I am just typing in the name of the symbol I would like to use. I'm trying to add a symbol picker.
  12. Trying to filter the resource browser but I am having trouble. result:=vsoButtonGetResource('SymbolName', kSymbol, 13, '') Doesn't filter anything. but: result:=vsoButtonGetResource('SymbolName', kSymbol, 13, 'Defaults:Railing Fence:Pickets') is filtering everthing but open drawings and favorites. How can I get this to filter everthing but symbols in the current drawing and symbols in my Workgroup Folder at 'Defaults:Railing Fence:Pickets'?
  13. Is there a simple example of the code to create the dialog to pick a symbol from a script?
  14. I am creating a 2D path object and I would like to duplicate an extrude along the path (Like the "Duplicate along path" command). How is this accomplished in Vectorscript?
  15. So using the "Data Manager" I can assign a record to a "Title Block Border" but I only want to assign the record if this formula is true: =if('Title Block Border'.'Current Revision Number'>0,____,) I have added this formula to the criteria with different options in the True value but none seem to attach the record. Only when I leave the formula completly blank will the record attach. Any ideas?
  16. LOL, thanks for letting know that I could rotate the clip cube around the z-axis! I must have missed that one!
  17. When using the publish dialog it would be great to add an option that would "exclude subfolders" when pressing the {Select Folder} button for "Add Items form Other Files" option. Often we keep archived files in a an archive folder inside the job folder. I never need to look deeper than the job folder for sheets to add to the publish dialog.
  18. Thanks, I added a criteria dialog to your script so the selection criteria is defined by the script prior to selecting the target class. PROCEDURE ChangeTextClass; VAR CriteriaInput,targetClass:STRING; Pass,dialog,layoutDialog:LONGINT; check:BOOLEAN; PROCEDURE Execute(h:HANDLE); {Changes class of given object to targetClass} BEGIN SetClass(h,targetClass); ResetObject(h); END; FUNCTION DrawDialog(DName:STRING) : LONGINT; {Creates dialog box and returns dialog ID} CONST kClassWidth = 25; VAR dia:LONGINT; BEGIN dia:=CreateLayout(DName,FALSE,'OK','Cancel'); CreateStaticText(dia,11,'Select Target Class',-1); CreateClassPullDownMenu(dia,21,kClassWidth); SetFirstLayoutItem(dia,11); SetRightItem(dia,11,21,0,0); DrawDialog:=dia; END; PROCEDURE DialogHandler(VAR item,data:LONGINT); {Handles dialog box} VAR int:INTEGER; BEGIN CASE item OF SetupDialogC: BEGIN END; 1: {OK} BEGIN GetSelectedChoiceInfo(dialog,21,0,int,targetClass); check:=TRUE; END; 2: {Cancel} BEGIN check:=FALSE; END; END; END; BEGIN Pass:=EditCriteriaWithUI(CriteriaInput); dialog:=DrawDialog('Select Text Class'); layoutDialog:=RunLayoutDialog(dialog,DialogHandler); IF(check) THEN ForEachObject(Execute,CriteriaInput); ReDrawAll; END; Run(ChangeTextClass);
  19. Here is a tool I made for creating a schematic wood truss. There is no engineering or structural calculations involved in this tool so use at your own risk and have your truss designs engineered. Do not rely on this tool to design your truss. You need to add the "Schematic Wood Truss" tool to a tool palette. The tool is in the "Hamer" group. 1. High side overhang only applies to single slope Howe truss. 2. To create a scissor truss you need to add a ceiling pitch 3. To create a box truss you need to set both ceiling and roof pitch to "0" Schematic Wood Truss.vwx Schematic Wood Truss.vso
×
×
  • Create New...