Jump to content


  • Posts

  • Joined

  • Last visited


29 Great

Personal Information

  • Occupation
  • Homepage
  • Location

Recent Profile Visitors

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

  1. After all this time, I still can't get a reliable search happening. This code supposes this hierarchy .. IfcMechanicalFastener Tekla Bolt Bolt Name and it works well. However, I have a client that sent me an IFC file with this hierarchy .. IfcMechanicalFastener IfcMechanicalFastener Bolt Name and it doesn't work when I try and find the Bolt Name. Can someone suggest a reason please ? 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. I'm formatting a worksheet for a job. In the "Total Items" cell, I want the answer =sum(B12, B13, etc.) However, this doesn't work. Then I tried summing the answer under the list in cell B17 and tried the formula =B17 in cell G3. That didn't work either, even though the B17 cell showed the answer. Please scroll down past this worksheet layout. Then I tried writing a macro. On it's own ( with WSScript_SetResStr (Num2Str (0, n)); replaced with Message (n)), it returns 32, which is the sum of cells B12 to B16. Nice. However, calling it with =RUNSCRIPT('Total Items') in cell G3, it crashes VW. If I put =RUNSCRIPT('Total Items') in B17, and =B17 in G3, it makes a mess. Any ideas or reasons would be appreciated. procedure Total_Items; var i : integer; n, V : real; h : handle; begin h := GetObject ('Grating - Fabrication List'); for i := 12 to 16 do begin GetWSCellValue (h, i, 2, V); n := n + V; end; WSScript_SetResStr (Num2Str (0, n)); end; run (Total_Items);
  3. So, finding a work around wasn't that difficult. This is how I solved it for those interested. The reason for making a Database line was to get the Record Value from an object, with a record attached, and list it on the same row as the Logo. The row must be of Spreadsheet type, and then the cell value =IMAGE(N='Logo') works. I wrote this macro and the added this formula to a cell to the right of the Logo =RUNSCRIPT('Name of script') Many of you will recognize the method. procedure Fab_List_Value; procedure Get_Value (h : handle); var V : string; begin V := Concat (GetRField (h, 'Value', 'GrWeight'), ' ', GetRField (h, 'Value', 'NtWeight')); WSScript_SetResStr (V); end; begin ForEachObject (Get_Value, ((L = 'Objects') & (C = 'Object1'))); end; run (Fab_List_Value);
  4. Thanks Pat, I feared that would be the answer. Thanks
  5. Hi, When I insert =IMAGE(N='Logo') into a spreadsheet cell, it shows me a picture of a logo. Good. However, if I make that line a Database, it displays "False", not the picture. Note: the named item is a 2D symbol. The following link says I can do it for spreadsheet and database cells, but how .. https://app-help.vectorworks.net/2023/eng/VW2023_Guide/Worksheets/Inserting_images_in_worksheet_cells.htm
  6. Interesting Kevin, After a bit more testing, and you suggestion of "same direction", I think I understand my error. Because the circle wouldn't Loft, I changed it to a polygon, but because there was no "convert to polyline" tool, I also changed the polyline to polygon to match. Big mistake. They wouldn't Loft either, so I changed them both to Nurbs and that's why it lofts to a group and not a Generic Solid. I will have to remember that the polyline should never be changed to a polygon before changing to a Nurb, but a polyline or polygon can be changed directly to a Nurb.
  7. Hi Virtualenvirons, Even though I have created this part using multiple extrude, your questions are valuable for other components I need to draw. As per my initial post, the circle is 60mm diameter and the oval is 30mm radius and 77.49mm long. It's actually a slot. The finished height is 90mm and the wall thickness is 5mm. I would be interested in reading your step-by-step method of creating the same object with Nurbs and Lofting.
  8. Yes, but I couldn't "Closed" it. The Close button would not stay ticked even though it was not greyed. The loft created multiple Nurbs and grouped them. It did not merge them into one solid/surface as I was expecting.
  9. Nice one Tom. That will keep me going for quite a while.
  10. Thanks Tom. Not having done much 3D stuff, you help is wonderful. However, if I set the Shell tool to 5mm inside, how can I get it to punch through the bottom 5mm ? Is the only solution to make the object higher and subtract solids to clip of the bottom 5mm ?
  11. The loft is 1024 Nurbs and I can't get them to add. I tried Generic Solid but it rejected the objects. I tried Adding Objects but it rejected that too. I'm not sure what you mean by Multiple Extrudes because there would have to be thousands to create a smooth surface. The Shell is the easy bit LOL
  12. I thought this would be easy by creating two objects and subtracting solids, but now I find that the shape made from Nurbs ends up as a group and can't be subtracted. Therefore, I'm calling for ideas please. Here's what I am starting with .. The oval is at level 0, and the circle is 90mm higher. This circle diameter is 60 and the oval is 77.49 if anyone is interested. After several attempts, I found that the shapes had to be converted to Nurbs and the with Loft Surface tool, I could make this "solid", so I thought .. With this and another, which is smaller so I can make a 5mm wall thickness, I wanted to subtract solids to make a tube, but it's not a solid, it's a group of Nurb surfaces. I obviously went down the wrong track, so any help would be appreciated.
  13. Thanks Pat, I had proposed too after inquiring for a solution, if it was available.
  14. Yes. Closing the file and opening it again does fix it. I don't need to close VW. The error re-occurs only after repeating the duplicate and rotation process again. The first duplicate and rotation remained constant but the second has the error. Files attached. Video Project 2.mp4 Zoom 3D screen image wrong after rotation.vwx
  15. "Do you want this app to make changes to your device." I get this message each time I start VW2024, by both starting the app directly, and by opening a file which opens the app. I completely uninstalled VW and reinstalled without luck.
  • Create New...