Jump to content

Pat Stanford

Moderator
  • Content Count

    6,304
  • Joined

  • Last visited

Community Reputation

949 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Veteran

Personal Information

  • Homepage
    vectortasks.com
  • Location
    El Segundo, CA, USA

Recent Profile Visitors

5,587 profile views
  1. What do you mean? A truss is mostly open airspace. Do you want the volume of the "solid" parts of the truss? Or do you want the volume of the outline of the truss? Or do you want to volume of the rectangular bounding box of the truss? Too many options to help without knowing more about what you really want and why.
  2. The way I figured this was to create a Report of all the fields in the Wide Flange - 3D object in a worksheet. I then changed the Series and Sizes and recalculated to see which field gave the data that was desired. Glad to help. :-) And I will take you up on the pint sometime.
  3. Try this: Set up your Data Tag to display the Custom Size Field. Manually edit in the Current Tag Field Definition box and change the #isCustom# to #__Size_4#. There are two underscores in front of size and one after. For me this appears to work for Universal Columns. It appears that at least for the first 10 items in the Series list you can change the suffix on the __Size_ part of the tag with the number that matches the sort order of the Series list. I.E. AISC (Inch) is 1, BSI (Universal Beams) is 3, BSI (Universal Columns) is 4, etc. I don't know of a way to get a single tag to display the correct information for different Series. HTH.
  4. Welcome to the club. Ask again the next time you get stuck. We are a pretty friendly bunch here. ;-)
  5. Check all of the options in the Export DXF/DWG dialog box carefully. Especially the Export Selected Objects Only option.
  6. OK, the following script will change the projection to Normal Perspective and the Render Mode to Open GL. If you go to Tools:Plug-ins...:Plug-in Manager and then to 3rd Party you can create a new Plug-in Command, click the Edit Script button and paste the script below into the window. Then edit your workspace to add the command and give it a keyboard shortcut. If you really wanted to get fancy we can add the view to change to as well, but you would have to have different versions for each different view. I don't think you can over-ride the keypad view commands or it would be kind of nifty to be able to hit (say) Option-1 on the keypad and get it to switch the view and change the render mode. For now you will have to change the view and then run the script. Procedure OpenGLandPerspective; {May 25, 2020} {©2020 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No Warranty Expressed of Implied. Use at your own risk.} Begin DoMenuTextByName('Projection',5); DoMenuTextByName('OpenGL Render Chunk', 1); End; Run(OpenGLandPerspective);
  7. A version updated for VW2020 to include Drop Shadow and Text Style has been posted in a different thread.
  8. And here is an update to the 2008 update of the script to set Attributes by Class. Two notes. 1. There does not appear to be a scriptable way to set TextStyle to by class on a document wide basis. 2. Changes selected objects. If no object selected then the Document defaults are switched to by class. {Developed ?2003 Katerina Panagiotakis} {Opacity and marker by class added 2008 Pat Stanford} {Drop Shadow and TextStyle by class added 2020 Pat Stanford} Procedure Classdf; var x,y,xo,yo: Real; h,oh,h0,hp,hx,ha,hg: Handle; B1:Boolean; {added 2020 by Pat Stanford for DocDropShadowByCl} message:integer; begin ha:=LSActLayer; GetOrigin(xo,yo); Locus(-xo,-yo); h0:=LNewObj; hp:=GetParent(h0); DelObject(h0); if GetType(hp)<>11 then begin if ha<>nil then begin ha := FSACTLAYER; WHILE ha <> NIL DO BEGIN; SetDropShadowByCls(ha, True); {Added Pat Stanford 2020} SetFillColorByClass(ha); SetFPatByClass(ha); SetLSByClass(ha); SetLWByClass(ha); SetMarkerByClass(ha); {Added Pat Stanford 2008} SetOpacityByClass(ha); {Added Pat Stanford 2008} SetPenColorByClass(ha); SetTextStyleByClass(ha); {Added Pat Stanford 2020} ha := NEXTSOBJ(ha); end; end; end; if GetType(hp)=11 then begin hg:=FInGroup(hp); ha := NextSObj(hg); if ha<>nil then begin if Selected(hg) = true then begin SetDropShadowByCls(ha, True); {Added Pat Stanford 2020} SetFillColorByClass(ha); SetFPatByClass(ha); SetLSByClass(ha); SetLWByClass(ha); SetMarkerByClass(ha); {Added Pat Stanford 2008} SetOpacityByClass(ha); {Added Pat Stanford 2008} SetPenColorByClass(ha); SetTextStyleByClass(ha); {Added Pat Stanford 2020} end; ha := NextSObj(hg); WHILE ha <> NIL DO BEGIN; SetDropShadowByCls(ha,True); {Added Pat Stanford 2020} SetFillColorByClass(ha); SetFPatByClass(ha); SetLSByClass(ha); SetLWByClass(ha); SetMarkerByClass(ha); {Added Pat Stanford 2008} SetOpacityByClass(ha); {Added Pat Stanford 2008} SetPenColorByClass(ha); SetTextStyleByClass(ha); {Added Pat Stanford 2020} ha := NEXTSOBJ(ha); end; end; end; B1:=DocDropShadowByCls; FillColorByClass; FPatByClass; LSByClass; LWByClass; MarkerByClass; {added Pat Stanford 2008} OpacityByClass; {added Pat Stanford 2008} PenColorByClass; {There does not appear to be a VS procedure to set set Text Style by class for hte document as of VW2020} ReDrawAll; end; Run(Classdf);
  9. Try this script. It sums the length of all of the Visible Selected Lines, Arc, Open Polygons and Open Polylines. The value is returned in a string dialog box so you can copy the value if you need to paste it somewhere. If you don't need that functionality, the final output could be provided in a different, less obtrusive fashion like a message box or even an minor alert so it only shown in the bottom border of the drawing window. You can just create a new blank Vectorscript document and paste everything below into the script editor and then run by double clicking on the script name in a script palette. Or you can make a Plug-in Command using the Plug-in Manager (Tools menu) and add it to your workspace and give it a keyboard shortcut. Procedure SumOfSelectedLengths; {May 25, 2020} {©2020 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {Displays a dialog box showing the summed length of all} {selected and visible lines, arcs, open polygons and } {open polylines.} {No Warranty Expressed or Implied. Use at your own risk.} {Stop use and ask a doctor is nausea lasts more than 2 weeks} {In case of overdose contact poison control center right away} {Do not operate electic scooters while using this script.} Var TheSum:Real; S1:String; Procedure AddEm(H1:Handle); Var TheType:Integer; Begin TheType:=GetTypeN(H1); Case TheType of 2: Begin TheSum:=TheSum + HLength(H1); End; 5: Begin If Not(IsPolyClosed(H1)) Then TheSum := TheSum + HPerimN(H1); End; 6: Begin TheSum:=TheSum + HPerimN(H1); End; 8: Begin If Not(IsPolyClosed(H1)) Then TheSum := TheSum + HPerimN(H1); End; 21: Begin If Not(IsPolyClosed(H1)) Then TheSum := TheSum + HPerimN(H1); End; End; End; Begin TheSum:=0; ForEachObject(AddEm, ((((T=LINE)|(T=POLY)|(ST=OPENEDARC)|(T=POLYLINE)) & (VSEL=TRUE)))); S1:=StrDialog('The Sum of the Lengths of the Selected Objects is:', Num2StrF(TheSum)); End; Run(SumOfSelectedLengths);
  10. Or even Reference in using a Design Layer Viewport and then break the reference.
  11. It sounds like they may have a zero pen weight or a Line Style of None. That is the only part of a generic solid that would be visible in a Top/Plan view.
  12. Opacity only applies to 2D Objects. For 3D objects (including extruded planes) you have to use a texture with Transparency.
  13. How about a work around? Either add a custom record or use one of the User Fields with an indication of which "base" symbol you are using. Add a column for that field into the worksheet and Summarize based on the custom field. That way it does not matter is you have 20 different symbols that are all of the same instrument, you can still get the count for all of them.
  14. Nope. Unless you are using variables you have been able to use the unwrapped version since at least Minicad 5.
  15. Congratulations!! You have now passed the first test of being a programmer. Are you willing to be more stubborn than the computer until you force it to bend to your will!! ;-)

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...