Jump to content

WhoCanDo

Member
  • Posts

    446
  • Joined

  • Last visited

Everything posted by WhoCanDo

  1. Hi, Has anyone else have the following problem ? With the new vw2024, I am finding that it's taking the focus away from everything else on the screen. What I mean is that if VW is open, I don't get my hidden taskbar pop up when I want it (without hitting the windows key), and I don't get email or Teams notification or Snipping pop up, or at least I don't see them pop up in front of VW like I did with previous versions.
  2. Since I raised this topic, I've had mostly success, but some anomalies. After fiddling a bit, this is my latest version which of course is specific to my process but may gleam some light on the problem. You must be on the layer of the crop polygons you are using to create the viewports. My line type is probably not available to you so you need to change that to your choice too. procedure Main; Label 1, 2; var Lyr, ViewportLyr, LineStyleName : string; i, j, DashedStyleNumber : integer; Pt : Array [1..500, 1..500] of real; hL, hV : handle; Loop : boolean; procedure Log_Selected (h : handle); var VT : integer; AR : real; hC : handle; begin hC := ConvertToPolygon (h, 0); DelObject (h); SetName (hC, 'Tmp'); i := i + 1; GetPolylineVertex (hC, 1, Pt[i, 1], Pt[i, 2], VT, AR); DelName ('Tmp'); SetDSelect (hC); end; procedure Create_Viewport; begin hV := PickObject (Pt[j, 1], Pt[j, 2]); if (hV <> Nil) then begin SetSelect (hV); DoMenuTextByName ('Create Viewport', 0); if (Loop = True) then begin ViewportLyr := GetLName (ActLayer); Loop := False; end; Layer (Lyr); end; end; begin DelName ('Tmp'); hL := ActLayer; Lyr := GetLName (hL); Loop := True; if (NumSObj (ActLayer) = 0) then Goto 1; if (YNDialog ('Every selection on active layer will be a bounding for a viewport. Continue?') = False) then Goto 2; DashedStyleNumber := -Name2Index('Dash Style-9'); { The bounding polygon will be a line style of choice } LineStyleName := GetDashLineTypeName (DashedStyleNumber); DSelectObj (((V=True) or (V=False)) & (LT <> LineStyleName)); if (NumSObj (ActLayer) = 0) then AlrtDialog ('Crop must be line type Dash Style-9'); i := 0; ForEachObject (Log_Selected, ((Sel = True) & (L = Lyr) & (LT = LineStyleName))); DSelectObj ((V=True) or (V=False)); For j := 1 to i do begin Create_Viewport; end; Layer (ViewportLyr); Goto 2; 1: { Error } AlrtDialog ('No bounding box selected, or bounding box is not "Dash Style-9".'); 2: { Abort }; end; run (Main);
  3. Hi all, Seems that Juan is MIA so can anyone else give me their opinion please?
  4. Thanks Juan, I just sent a PM & updated my signature.
  5. Hi, I am given IFC files from clients all the time by email. This one is 1 mb. When I export an IFC, eg. below, it is 416 mb and not nearly as complex. Any hints in getting the IFCs smaller?
  6. Hi, After drawing a radius dimension, I want the dimension size to be text and the arrows inside. The script below does this, except that it doesn't display correctly on the screen. Even though the "Arrows Inside" is ticked in the OI, there is not a line projecting to the center point. Is there any screen refresh I should be adding? procedure Fetch; procedure Dimension_Text (h3 : handle); begin SetDimText (h3, Concat ('R ', GetDimText (h3))); SetObjectVariableBoolean (h3, 3, True); end; begin ForEachObject (Dimension_Text, (T = Dimension) & (Sel = True)); end; run (Fetch);
  7. Thanks Raymond, Yes there is an update to SP4 that I didn't know about. After installing SP4, Alt-9 still doesn't work for a Tool type. I'll also use your idea Ctrl-Alt-9 (Windows) for a Menu command. For anyone else reading @Julian Carr also suggested using 9 U to toggle through Group 1. Thanks all.
  8. vw2023 - My script works fine. I'm not sure we are talking about the same "tool". tool = workspace editor = When I chose the keyboard shortcut Alt-9 in the Workspace Editor, it doesn't work from the keyboard.
  9. Continuing on a bit, the following is my new "tool". However, I can't seem to apply a keyboard shortcut to that tool ( eg. Alt-9 ), or any tool as far as I can tell. The Edit Current Workspace allows me to allocate Alt-9 to the tool but it doesn't work. Can anyone tell me if it is possible ? On a slightly different subject, the Edit Current Workspace also allows me to apply the keyboard shortcut "9", but doesn't tell me that "9" is already allocated to another tool. procedure RWall; begin { -208 Wall Tool } SetToolWithMode(-208, 1, 2); { Group 1, Selection 1 ie Straight Wall } SetToolWithMode(-208, 2, 1); { Group 2, Selection 1 ie Top alignment clockwise } { yet to include wall style option } end; run (RWall);
  10. Gotcha. I must have been looking at some other older link. Ta
  11. I've lost you after https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#attrCrit Where is SetTool ?
  12. I'll give that a go Raymond. Where do you get the list of number from? The Function Reference page help menu is pretty useless when it comes to actually helping. SetToolWithMode( toolIndex :INTEGER; modeGroup :LONGINT; modeButton :LONGINT); doesn't give any reference to what the numbers are.
  13. Hi, SetTool (-208) is a Straight Wall. What is the RoundWall code?
  14. Peter's statement is correct. "I cannot see different layers when they are different scales" also. When you turn on 2D Legacy and then turn off Unified View, everything returns to the 2021 & previous viewing. However, you can't turn Legacy 2D off unless you want all the other scaled layers to preview at their scaled sizes.
  15. You can send it to me, on private message if you want, and I'll convert it for you 🙂
  16. Perfect Pat, Thanks for you efforts an the coding tips.
  17. How did you know I would get stuck Pat? 😊 With the following, it turns on all classes for all viewports, selected or not "Class Visibility In All Viewports - 1018 - Integer - VS:SetObjectVariableInt" I just want Selected Viewports (if not named TB) to have all classes on. Selected Viewports are critical because if I have edited the class list for a specific Viewport then I won't select it for this script. procedure ClassOn; procedure Set_Class_On (h : handle); var i : integer; begin if (Pos ('TB', GetName (h)) > 0) then begin end else for i := 1 to ClassNum do SetObjectVariableInt (GetObject (ClassList (i)), 1018, 0); end; begin ForEachObject (Set_Class_On, ((Sel = True) & (T = Viewport))); end; run (ClassOn);
  18. Thanks for your time Pat. So it's SetObjectVariableInt that I was missing. Interestingly, when I searched through the Appendix (and tried a "Find" on the same pages) the other day, Viewport was not found. I can see today that the Appendix has change it's format so I'm not sure where I ended up. Even the Hyperlink that I used has been removed.
  19. Interesting Boh, that's an interesting process. Thanks for that. Any ideas as to how to switch all classes on for all specifically named Viewports on all Sheet Layers in VS ? Looping through the layers and selecting the specific Viewports is the easy bit. Turning on the class visibility is the problem.
  20. And even if (T = Viewport) did work, you can GetCVis but you can't SetCVis.
  21. Nice work-around Pat. However, adding classes, making mistakes, going back to fix them, doing the above multiple times, I'd rather put it in the macro that assigns the classes in the first place. How do you think this is achievable in a script? This doesn't work ForEachObject (ClassesVisible, (Sel = True), (T = Viewport)); Why wouldn't it be default "Visible" ? Who would want to draw something and then give it a class that is not visible on their Viewport? I thought the working flow should be draw-it, class-it, remove it from Viewport if not required.
  22. I have customers that, annoyingly, send me jigsaw pieces of their product. I will re-draw these pieces on design layers and then create viewports of each piece so I can arrange them and fit them together to see what it looks like completed. Next I will add a class to each of the components for parts lists. The reason for the completed viewport view is so I can add classes in some sort of regular alpha-numeric flow (eg. left to right). However, after adding classes, it seems that the default for the viewport class list is "Invisible". I know that this visibility choice can be made by manually creating a new class, but can it be done in VS ?
×
×
  • Create New...