Jump to content

The Hamma

Member
  • Posts

    364
  • Joined

  • Last visited

Reputation

143 Spectacular

5 Followers

Personal Information

  • Occupation
    Architect
  • Location
    United States

Recent Profile Visitors

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

  1. I have created a point object ot create Pre-Engineered Metal Builidng trim for Doors and windows. I would like to have it also create a 3D hole object. Does anyone know how to do this? PROCEDURE PEMBOpeningTrimPointObject; CONST SourceSub = ''; {Sub path} ResType = 94; {Class Def} folderIndex = -8; {Standards} VAR unitmultiplier,JambComp:REAL; H2,H3,H4: Handle; Result:BOOLEAN; ResourceName:STRING; currentunits,ListId,NumItems:LONGINT; CNo:INTEGER; PROCEDURE ImportClass; BEGIN ListId:= BuildResourceList(ResType,folderIndex,SourceSub,NumItems); WHILE NumItems <> 0 DO BEGIN ResourceName:=GetNameFromResourceList(ListId,NumItems); IF (ResourceName = PClass1) THEN BEGIN H4 := GetResourceFromList(listID, NumItems); if (H4 = NIL) then H4 := ImportResourceToCurrentFile(listID, NumItems); END; NumItems := NumItems-1; END; END; BEGIN unitmultiplier := 1 ; currentunits := GetPrefInt(170); {assign the current document units interger to currentunits varaiable} if currentunits = 1 THEN unitmultiplier := 25.4; if currentunits = 2 THEN unitmultiplier := 25.4; if currentunits = 3 THEN unitmultiplier := 304.8; if currentunits = 4 THEN unitmultiplier := 914.4; if currentunits = 5 THEN unitmultiplier := 1609000; if currentunits = 7 THEN unitmultiplier := 1; if currentunits = 8 THEN unitmultiplier := 10; if currentunits = 9 THEN unitmultiplier := 1000; if currentunits = 10 THEN unitmultiplier := 1000000; BeginGroupN(H2); {Import Classes if they don't exist} CNo:=ClassNum; NameClass(PClass1); IF CNo < ClassNum THEN BEGIN DelClass(PClass1); ImportClass; END; if PCreateSill = TRUE THEN JambComp := 0 ELSE JambComp := PDoorJambThickness; {Compensate for door jamb thickness} {Create the Trim} BeginXtrd(0,PTrimDepth); RectangleN(POpeningWidth/2+PTrimWidth+JambComp,PHeadHeight-.01+JambComp,0,90,PTrimWidth+.01,POpeningWidth+PTrimWidth*2+JambComp*2); RectangleN(POpeningWidth/2+PTrimWidth-.01+JambComp,PHeadHeight-POpeningHeight,0,90,POpeningHeight+JambComp,PTrimWidth+.01); RectangleN(-POpeningWidth/2-PTrimWidth+.01-JambComp,PHeadHeight-POpeningHeight,0,90,POpeningHeight+JambComp,-PTrimWidth-.01); if PCreateSill = TRUE THEN RectangleN(POpeningWidth/2+PTrimWidth,PHeadHeight-POpeningHeight-PTrimWidth+.01,0,90,PTrimWidth+.01,POpeningWidth+PTrimWidth*2); SetClass(LNewObj,PClass1); SetFPatByClass(LNewObj); SetLWByClass(LNewObj); SetTextStyleByClass(LNewObj); EndXtrd; SetClass(LNewObj,PClass1); SetFPatByClass(LNewObj); SetLWByClass(LNewObj); SetTextStyleByClass(LNewObj); EndGroup; Rotate3D(90,0,0); {Move object so it insets into wall} Move3DObj(H2,0,.01,0); Locus(0,0); END; RUN(PEMBOpeningTrimPointObject);
  2. Script to center selected space tags on associatied spaces. PROCEDURE MoveSDTScript; {script to center selected space tags on associatied spaces. note if the handle for the space is outside the boundry of the space the tag will be centered on the space and the bounding point} VAR h,h2 :HANDLE; index,associationkind,value:INTEGER; phx,phy,ph2x,ph2y:real; FUNCTION MoveDT(h :HANDLE) :BOOLEAN; BEGIN h2:=GetAssociation(h,index,associationkind,value); Hcenter(h,phx,phy); Hcenter(h2,ph2x,ph2y); HMove(h,ph2x-phx,ph2y-phy); END; BEGIN ForEachObjectInLayer(MoveDT,2,0,2); END; RUN(MoveSDTScript);
  3. In a vectorscript, does anyone know how to get the handle of an object that a data tag is associated with. Specifically I am trying to get the handle to a space from selecting the data tag for that space.
  4. The one "above at this link" is the latest one that has not been custimized to my personal workspace. Any reason why you want me to repost it?
  5. I may have missed this but I have modified a wood gate to be on the correct side of the fence but I can not make it flush out with the face of the gate or elimate the gap between the center of the post and the gate. Anyone have a way to do this? Fence Gate.vwx
  6. @Jesse Cogswell, I just found this script and it is awesome. Just wanted to make everyone aware that besides the issues as noted by @MarcelP102 above the script also does not work well when the user origin is not the internal origin. The symbol will displace and the symbol's internal origin will also be offset. Jesse if you figure out how to fix the origin issue please let me know as I have a drawing label aigning script that also has the same issue.
  7. I installed this profile on my Window machine and none of the commands work but all of the instructions are correct. It appears the hotkey functions are not interchangable between Windows and Mac. If I replace the "F" hot key with a "F" it processes half of the command. I have to replace the "Return" hot key with a "Return" and it processes the entire command. Not sure why they are different.
  8. Yes I think this should be Platform- agnostic but it is slower than the method that I just posted that uses the two plugin scripts which should also be Platform-Agnostic but I have not tested it on a Mac. This version uses the names of the Commands, Tools or tool indexes rather than shortcuts except for the shortcuts for: Which it uses to call the plugins and awaits the name of the tool which is sent from Stream Deck Menu command call (note if there is not a chunk number you must add 00 to the end of every command, if there is a chunk number enter 01 for 1 and 10 for 10) Tool Name Call Tool Index call
  9. Link to the my stream deck profile that I posted.
  10. Here is my Stream Deck Profile for the Standard Architect Workspace. I requires that you add the two attached plugins to your workspace and set their shortcuts as shown. Feel free to re-arrange as you see fit. v Vectorworks 2024 Stream Deck.zip
  11. Ok I was wrong about "Window Tool" and "Door Tool" being internal commands, but the other two "Slab Tool" and "Wall End Cap Tool" do not have pugins and can't be called.
  12. This is actually what I’m working on. I have written two, scripts that I use to call the functions from stream deck with a shortcut. It calls the script and then has user input for the tool name. This is where I have stream deck, enter the name of the tool. Or the index. Which then is executed by the script. my scripts are attached. I am using control+shift+alt+X for the tool shortcut And control+shift+alt+Z for the menu shortcut If I ever finish my stream deck profile, I will upload it PROCEDURE StreamDeckCommand; {Input the command name with the index at the end of the name. Use two digits for the index name. ie. for 1 use 01 for 0 use 00. Print command would be "Print00", Font Size 4 command would be "Font Size01" and Font size 144 would be "Font Size17"} VAR SDstring,SDStrInt:STRING; SDLen,SDInt:INTEGER; BEGIN SDstring:=StrDialog('Command to run',''); SDLen:=Len(SDstring); SDStrInt:=Copy(SDstring,SDLen-1,2); SDInt:=Str2Num(SDStrInt); SDstring:=Copy(SDString,1,SDLen-2); if SDstring <> '' THEN DoMenuTextByName(SDstring,SDInt); END; RUN(StreamDeckCommand); PROCEDURE StreamDeckTool; {Either input the tool name or the tool index} VAR Istool,SDstring:STRING; Result:BOOLEAN; BEGIN SDstring:=StrDialog('Command to run',''); Istool:=Copy(SDstring,1,1); if SDstring <> '' THEN BEGIN IF Istool = '-' THEN Result:=SetToolbyIndex(Str2Num(SDstring)) ELSE Result:=SetToolByName(SDstring); END; END; RUN(StreamDeckTool); StreamDeckTool.vsm StreamDeckCommand.vsm
×
×
  • Create New...