Jump to content

WhoCanDo

Member
  • Posts

    402
  • Joined

  • Last visited

Everything posted by WhoCanDo

  1. Hi Pat, There are not instances of FirstWkSht on the drawing since it's a list of material to cut and therefore has a total length and total weight listed. I want the weight listed on the second worksheet but the format of the second worksheet means that the link is on the database line of a different database item. So the first worksheet, line 56, is database criteria =DATABASE((R IN ['Kickplate'])) with the cell C56 containing =(Product.Weight) ..... the answer is 9.38 kg The second worksheet, line 5, is database criteria =DATABASE((R IN ['A/Panel'])) with the cell G5 containing =('FirstWkSht':C56) ...... the link shows 18.76 kg I tried to divide the link answer by COUNT(R IN ['A/Panel']) but that gave an answer of 2, however if I put =COUNT(R IN ['A/Panel']) in a "spreedsheet" cell (say E14) then divide the link answer by that spreedsheet cell, it does work. eg. =('FirstWkSht':C56)/E14 The thing is, I don't want a line of unrelated numbers showing up, and even though I could hide this line, I shouldn't have too. Can you see a fault in my formulas?
  2. Now this has caused a different problem. On the first worksheet I have in cell C56, =(Product.Weight), which for 8 objects displays 9.38 kg correctly. On the second worksheet I have =(FirstWkSht:C56) with the result 18.76 kg. The link to the first worksheet is on a database defined "Item" line that is not the same database as C56 "Product" and has 2 items listed. So, the weight on the first worksheet is correct, but when reflected on the second worksheet, the reflected value is multiplied by the record count on that line. =(FirstWkSht:C56)/Count(R in ['Item']) doesn't work Is there a solution to this?
  3. With CreateLayout ('Title', True, 'OK', 'Cancel'); I can see that "True" adds a block to the dialog but how do you populate the block with helpful text?
  4. Thankyou, I'll keep that in mind. So h := NextObj (h); was the answer to my problem. Thanks to all.
  5. It's been like this for years and only recently stopped working. I can see your point, so that means that VW has ignored the RecalculateWS (h) for years rather than running indefinitely and chosen to run indefinitely. This maybe the fix but it counts 106 instead of the expected 15 worksheets. I'd like to know why if anyone can help. h := FInGroup (GetParent (GetObject ('Banding Cutting List'))); p := 0; while (h <> NIL) do begin p := p + 1; if (GetTypeN (h) = 18) then RecalculateWS (h); h := NextObj (h); end; Message (p);
  6. No, I'm still on 2016. No updates between working last week and not working this week. Other suggestions appreciated.
  7. Can anyone suggest why this has stopped working for me. The script just looks until I press ESC but it use to work for years. h := FInGroup (GetParent (GetObject ('Banding Cutting List'))); while h <> NIL do if (GetTypeN (h) = 18) then RecalculateWS (h); The worksheet "Banding Cutting List" exists in the sub-folder Worksheets in the Resource Browser. There are only 15 worksheets in this folder and yet the integer loop counter I tested just kept going past it's positive limits. I must be missing something here.
  8. Chrissy, How did you get this to work? I added SetTextSize (h, 0, 99, GetTextSize (h, 1) / GetLScale (ActLayer) * 25); after the message. This changes the text visually on the screen, but not really. If you cut and past the dimension, it shows the original text size. I think we want the same thing for different reasons. I've written a macro to change all layers of the same scale as the active layer to a new asked scale. The problem is the text doesn't stay the same point size after the layer changes scale and the code that Raymond wrote (with my addition above) changes the text only visually.
  9. Except when the Saved View is the Viewport sheet.
  10. Actually yes but I have "Restore Unified View" off.
  11. Thanks Gytis, I've been watching myself and it's definitely doing it on itself when switching to OpenGL. Anyone else having this problem?
  12. Hi, Anyone had problems with Unified View? We usually draw with if off but if I switch in and out of OpenGL (I think) it seems to switch the other layers to 3D as if Unified View was active. The other layers usually switch to Top View rather than Top/Plan. Any ideas why this would happen when Unified View is not selected? Is there a keyboard shortcut that I may be using without realising it?
  13. I just tried making a backup and deleting the SavedSettings.xml No luck at fixing the problem.
  14. Really, how annoying. As I said, mine only started after changing licence numbers. Sorry for you.
  15. Hi, Since loading a trial licence to test a problem for the VW techs, my dialog boxes open inconsistently in the top left corner of my screen. "Inconsistently" because the same dialog can pop up in the middle of the screen (where it should be) the next time. How can I stop the dialogs from my macros & VW (like "move") from poping up anywhere else but the middle where it should do? Even after changing the serial number back to my purchased number, it still happens.
  16. The experimenting I've got it. =('Worksheet Name':I16) However, does Nemetschek have any help for worksheet formula/help?
  17. There doesn't seem to be a specific worksheet discussion page so can someone let me know how to =(another worksheet.cell reference) please. Does Nemetschek have any help for worksheet formula/help?
  18. Thanks Raymond, Something in you code is ReverseWallSides(h); but when I minimize it, it works fine. Thanks PROCEDURE Main; { St. Patrick's Day 2016 - Raymond Mullin } VAR h : HANDLE; StartAng, SweepAng, ArcRadius : REAL; P1, P2 : VECTOR; { ARC Start and Stop points respectively } Pcen, Pmid : VECTOR; { ARC Center and Mid points } BEGIN h := FSActLayer; if (h <> nil) then BEGIN { Get arc data } GetSegPt1 (h, P1.x, P1.y); { start point } GetSegPt2 (h, P2.x, P2.y); { stop point } hCenter (h, Pcen.x, Pcen.y); { center point } GetArc (h, StartAng, SweepAng); ArcRadius := Distance (Pcen.x, Pcen.y, P1.x, P1.y); Pmid := Pcen + Ang2Vec (StartAng+SweepAng/2, Distance (Pcen.x, Pcen.y, P1.x, P1.y)); DSelectAll; Locus(Pmid.x, Pmid.y); END; { if } END; RUN (Main);
  19. One option I have used is to set the units as you want them in a blank sheet and then export the script and see what you get. I used Excel to compare two scripts by pasting each into columns A & B and then by using the code.. =IF(A2=B2,"",1) in column C (dragged down)
  20. Thanks to all that viewed my question. The answer is.. P4.x := P2.x + ArcRadius * Cos (Deg2Rad (SweepAng/2)); P4.y := P2.y + ArcRadius * Sin (Deg2Rad (SweepAng/2));
  21. Hi, I always have problems understanding vectors so a little help would be appreciated. If I draw a round wall, I would like to find the vector point on the center-line of half the arc length. I can find the radius "Distance (P2.x, P2.y, P3.x, P3.y)" and the angle "SweepAng/2" but how do I get the new vector P4 .. PROCEDURE Main; VAR h : HANDLE; StartAng, SweepAng, ArcRadius : REAL; P1, P2, P3, P4 : VECTOR; BEGIN h := FSObject (ActLayer); GetSegPt1 (h, P1.x, P1.y); hCenter (h, P2.x, P2.y); GetSegPt2 (h, P3.x, P3.y); GetArc (h, StartAng, SweepAng); ArcRadius := Distance (P2.x, P2.y, P3.x, P3.y); Message (StartAng, ' ', SweepAng, ' ', ArcRadius); P4 := Ang2Vec (SweepAng/2, Distance (P2.x, P2.y, P3.x, P3.y)); DSelectAll; h := PickObject (P4.x, P4.y); END; RUN (Main);
  22. Hi, SetPrefReal (70, ???); sets the print area scale. How do I change the print area orientation from Portrait to Landscape and back again? Regards
  23. Thanks Mike, I'm not ungrouping anything in the macro so I guess this is similar to VW2014 "Do you wish to attach the record to everything within the group" Thanks, I'll choose No then. Regards
  24. A warning popped up when my macro is trying to a single record to a group of rectangles "attach group records to the resultant ungrouped objects" Can anyone give me an idea to what this means please? Yes & No seem to produce nothing different to what I want so why did it ask? Thanks
  25. Good job Tui, HMove(hW1, BorderWdth/2 - HWidth (hW1), BorderHght/2) works a treat. Regards
×
×
  • Create New...