Jump to content

Pat Stanford

  • Content Count

  • Joined

  • Last visited

Community Reputation

652 Spectacular

About Pat Stanford

  • Rank
    Vectorworks Veteran

Personal Information

  • Homepage
  • Location
    El Segundo, CA, USA

Recent Profile Visitors

4,671 profile views
  1. First the background. The Vectorworks IFC implementation uses Record Formats to generate IFC PSets which are basically pulled into the IFC record. This effectively give an extremely extensible record format, but also makes it 'interesting' to get at that IFC Data programmatically. In a worksheet you can use the GetIFCProperty function to tell the worksheet what IFC Pset and Field (Property) to return. But there is no way to use an IFC PSet Property as part of a criteria. This should be submitted as a Wish/Enhancement request. Or at the very least be able to tell if a given Pset is part of the IFC record. So the following script will select every object in a drawing that has an IFC Type of "IFCMechanicalFastener" AND has a non-blank 'Tekla Bolt'.'Bolt Name' as part of the IFC record. This could be relatively easily adapted to other IFC object types, PSets, and properties by editing the string constants in the script. Procedure SelectByIFCProperty; {December 13, 2019} {© 2019 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {Selects all objects that are defined as IFCMechanicalFastener } {and have an IFCPSet of Tekla Bolt with a non-blank Bolt Name attached.} {Here be dragons. No Warranty Expressed or Implied. Use at your own risk} Var B1:Boolean; S1,S2,S3,S4:String; N1:Integer; Procedure Execute(H1:Handle); Begin B1:=IFC_GetPSetProp(H1,S3,S4,S2,N1); If ((B1=True) & (S2<>'')) then SetSelect(H1); End; Begin S1:='Tekla Bolt.Bolt Name'; S3:=Substring(S1,'.',1); S4:=Substring(S1,'.',2); DSelectAll; ForEachObject(Execute,((IFC_ENTITY='IfcMechanicalFastener'))); End; Run(SelectByIFCProperty);
  2. Can you attach a sample file with an instance of the Tekla Bolt with the IFC record attached? Or tell me a simple way to create a file with this object type so I can see what is happening?
  3. Type it in where you show the highlight? I think if there is only one viewport and you click the update scale button it will use the viewport scale.
  4. With the object(s) selected, change the class in the OIP and you can set it to whatever class you want. Or goto Tools:Plugins:Plugin Manager and create a new Command. Copy and paste the following script in to the command script. Then edit your workspace to add it to a menu and give it a keyboard shortcut. This will change the class of all visible selected objects to the active class. Procedure ClassAsActive; {December 10, 2019} {©2019 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {Sets all visible selected object to the active class} {No warranty expressed or implied. Use at your own risk} Procedure Execute(H1:Handle); Begin SetClass(H1,ActiveClass); SetSelect(H1); ResetObject(H1); End; Begin ForEachObject(Execute,((VSEL=TRUE))); RedrawAll; End; Run(ClassAsActive);
  5. First question to as is why you need the trim. If you really need it in 3D because you are concerned about clearances or shadows, they you will have to create it all. However if it is really just going to be background in renderings, I would consider drawing it in 2D export to an image and create a texture for each wall. Probably only slightly less work than doing 3D models, but it will keep you file much lighter and probably improve rendering speeds.
  6. Are you saying it moves with your cursor as if you are going to insert it like a symbol? Is this with all tools or just the Selection tool? Standard procedure for strange events like this is: 1. Restart VW. 2. Restart the computer. 3. Run VW from a different user account (this if effectively a test for 4). 3. Delete the preferences. More details on deleting preferences in this thread:
  7. Procedure Test; Var H1:Handle; Begin H1:=FLayer; While H1<>Nil do Begin AlrtDialog(GetLName(H1)); H1:=NextLayer(H1); End; End; Run(Test); Try the above script and see what happens when you move the layers around. Throw in a check to see if the layer is Design or Sheet and you should be able to get what you need relatively easily. Interestingly, Flayer gives the highest numbers Design Layer, but when it wraps around to the Sheet Layers it starts with the lowest number in the stack order. If you need to change the order check out HMoveForward and HMoveBackward.
  8. But you are new to the forum 😉. Which is what is used to calculate that. Make a few more posts, get a few more likes and you will move up the heirarchy. And no, I don't know what all the levels are or what it takes to move to each level. 🙂
  9. I don't know of a way to get those displayed values into a worksheet. They don't seem to be stored in a record attached to the stake object and look to be generated on the fly, but I don't know what calculation they are using to generate them. Hopefully someone else will have a solution.
  10. How many dash styles do you usually use/need? Do you want to define them? Or just show all of the styles in the document?
  11. I don't think it has anything to do with taxes. Vectorworks has to deal with two operating systems. They can't plan releases around unannounced release dates of those OS's. When VW picked the fall release date before Apple moved to Fall OS releases. As far as planning goes, a VW release is planned a long time in advance. There ads that have to be created and purchased, training materials that have to be created. Etc. If Apple decided in June to say they would not release until December (or October as they did this year), that is far too late for VW to be able to rearrange their schedule. The best we can hope for is a product to be ready when it is released. Any outside changes that happen after then just have to be dealt with.
  12. Hand:=NextLayer; Check out the Vectorscript Function Reference, either the local one in Applications:Vectorworks 2014:VWHelp:Script Reference or the online version at: http://developer.vectorworks.net/index.php/VS:Function_Reference Easiest way is to look at the document By Class (top left) and then the Document List Handling section.
  13. I don't know that there is really a good solution for this. When I did this for a customer (about a decade ago), He wanted to export his highly detailed cad models. Until I pointed out that the end users really didn't need and he didn't want to give out all of the internal dimensions and tolerances. All they needed was an external model. I think we ended up converting to just enough Generic Solids to allow the different textures required. We then exported STEP and IGES versions. There are probably better export formats now. But when I am importing 3D, these are usually the two I fall back on for engineering parts. There probably is no one best export format and offering different formats is probably your best option.
  14. OK, try this. Copy the script below. Go to Tools:PlugIns:PlugIn Manager Click the New button and choose Command. Set the name to Set Line Weight and click OK. Click the Edit Script button and paste the script into the Script Editor window. Click OK. Click Close. Go to Tools:Workspaces:Edit Current Workspace. Pick the Menus option at the top center of the dialog box. Select Miscellaneous in the left column and drag that to one of the menus (where you want the command to live, create a new menu if you want). Enter a keyboard shortcut for the command. Click OK. Run the command by entering the keyboard shortcut you entered. Procedure PS_SetLineWeight; {December 2, 2019} {©2019 Patrick Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {Opens a dialog box asking for a line weight and then sets all visible selected objects to that line weight} {Line weight is entered in integer points.} {Use at your own risk. No warranty expressed of implied.} {There be Dragons.} Var N1:Integer; H1:Handle; Procedure Execute(Hand1:Handle); Begin SetLW(Hand1,N1); End; Begin N1:=IntDialog('Enter Desired Line Weight', '20'); ForEachObject(Execute,VSEL); End; Run(PS_SetLineWeight);
  15. Do you want the script to change the line weight on the selected objects or to change the default so that future objects are drawn at that line weight or both?


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...