Jump to content

WhoCanDo

Member
  • Posts

    402
  • Joined

  • Last visited

Everything posted by WhoCanDo

  1. 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);
  2. 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.
  3. 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.
  4. And even if (T = Viewport) did work, you can GetCVis but you can't SetCVis.
  5. 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.
  6. 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 ?
  7. Nice start Andy. I agree with you about setting it to default "Visible". I can't think of a reason why you would want to make a new class and not see it in viewports if the drawing has viewports.
  8. 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 was wondering if there was an option to default "Visible" instead of default "Invisible". Maybe this is a fault that needs to be corrected by VW??
  9. Perfect Raymond, your a time saver LOL
  10. Hi, I work in 2D on the Design layers. When I'm given more designs to draw than will fit on an A3 page at a reasonable scale, I will draw them anywhere on the Design layer and then place a rectangle around each design to create a bounding box for each viewport. Then I can sort those viewport crops into an order of my choice and create multiple Sheet layers to accommodate the compete project. The latest project has 34 viewports on 3 Sheet layers when finished. 34 viewports created one at a time is a pain so I have written a macro create all the viewports so I can cut and paste them onto the Sheet layers as I see fit. The problem is that the macro below randomly selects my bounding boxes and makes viewports of the contents, but the bounding boxes it ignores, it just makes a viewport of the whole layer. From the 34 viewports on my current project, it makes 15 viewports from the bounding boxes, and 19 layer viewports. It always uses the same bounding boxes for the 15, and always creates the the same layer viewports. Any ideas as to how to correct this ? procedure Main; var Lyr, LineStyleName : string; i, j : integer; Pt : Array [1..500, 1..500] of real; hL, hV : handle; procedure Log_Selected (h : handle); begin SetName (h, 'Tmp'); i := i + 1; Pt[i, 1] := LeftBoundN (N='Tmp'); Pt[i, 2] := BotBoundN (N='Tmp'); DelName ('Tmp'); end; procedure Create_Viewport; begin hV := PickObject (Pt[j, 1], Pt[j, 2]); if (hV <> Nil) then begin SetSelect (hV); DoMenuTextByName ('Create Viewport', 0); Layer (Lyr); end; end; begin hL := ActLayer; Lyr := GetLName (hL); i := 0; ForEachObject (Log_Selected, ((Sel=True) & (L=Lyr))); DSelectAll; For j := 1 to i do begin Create_Viewport; end; end; run (Main);
  11. Unfortunately, when there is a bug that doesn't have a work-around, the forum can't help and the only resort is a bug report to limbo.
  12. I wish that support could start a ticketing system for reported bugs. When I have reported bugs in the past, there is no "thankyou" or "we've registered your problem" or anything. There is nothing to follow to know if it is being fixed or not received or ignored. A ticketing system would respond with a ticket number that could be followed. An accessible list could advise us of the current status, and maybe a favourites button (per user) could count up users with the issue and increase the priority. My last bug report in February is major for us. We can't change from 2021 to 2022 until fixed. Without feedback we could be waiting until 2023 or 2024 before we can upgrade, and we may be paying for Service Select without being able to use the latest versions.
  13. Hi, I've written a macro to rename ( SetName ) my sheet names eg. Sht-1, Sht-2, Sht-3 to Sht-2, Sht-1, Sht-3 However, ideally, I would like to change the stacking order. Is there a procedure or function to do this ?
  14. Nice one Raymond, this works for me 😊 procedure Delete_Vertex; var i, j, VT : integer; AR : real; p1, p2 : vector; hPoly : handle; begin GetPt (p1.x, p1.y); hPoly := PickObject (p1.x, p1.y); SetSelect (hPoly); j := GetVertNum (hPoly); for i := 1 to j do begin GetPolylineVertex (hPoly, i, p2.x, p2.y, VT, AR); if (Norm (p2 - p1) = 0) then DelVertex (hPoly, i); end; end; run (Delete_Vertex);
  15. Hi, Using GetVertNum I can get the number of vertices in a polygon. Using DelVertex I can delete one of those vertices. But how can I delete a specific vertex? Can I point to it with the cursor? How can I find the vertex number from pointing to it?
  16. Thanks Raymond, Since I can export the VW2022 file to VW2021, and it works in VW2021, then I shall have to report this as a bug on the Windows platform. Thanks for your help.
  17. Hi Raymond, Are you saying that after the script is run, that all objects except the large polygon have the MyRecord attached without additional interaction ? I only see this attached to the wall object on a Windows PC.
  18. Hi, I've been using this abridged macro for years. However, it doesn't seem to work with VW2022. Can anyone suggest why all the objects within the large polygon will accept the attachment of MyRecord (change this name as required), except the Wall object ? procedure Fetch; var hFSA : handle; procedure Test (h : handle); begin SetRecord (h, 'MyRecord'); end; begin DelName ('Tmp'); hFSA := FSActLayer; SetName (hFSA, 'Tmp'); ForEachObject (Test, (Loc = 'Tmp')); end; run (Fetch);
  19. Hi Peter, Yes, I did migrated it across. Your question prompted me to look at the standard workspace and I have found it. However, it doesn't work when I add it to my migrated workspace. All other right click options have disappeared and only the Recent Commands is visible. Clicking on it crashes VW.
  20. Hi Peter, I am not using 2022 until the bugs are fixed. The above is a picture of 2021. However, I don't see any difference in 2022 when I compare them. Where is Repeat Last Command?
  21. Hi Peter, Am I missing something here? I don't have Last Command and Recent Commands under right click. I even looked in Workspace Edit to see if was there. Can you expand your suggestion please? Wow, a search on the web for "Repeat Last Command" goes back to before this new platform. All asking the same thing as below. Below left is what I currently have thanks to Pat ( Previous Tools ), however, on the right is what I want. An example list of commands/macros that I frequently use. 5 to 10 would be good.
  22. Thanks Pat, Got that one, but I was really referring to commands like Move or Save or more importantly - the macro commands I make myself.
  23. Hi, My wish would be to add to the Smart Option Display, a selection of last used commands/macros. Maybe the last 5 macros I used, so I can use them again repetitively for a while.
  24. Thanks Tom. With your confirmation, I've tried several tests and have found the reason why. We draw with Document Preferences/Use Layer Colors "on" by default. For some reason, "on" won't print worksheets in colour, "off" will. So, can any one tell me if this is a bug or intentional please?
  25. It seems that it is possible to highlight cells in colour by changing the cells pattern to solid and choose a colour. However, those colours don't print to a printer or Microsoft print to PDF. What's the point of having the ability of highlighting if it can't be printed? How can I print them in colour?
×
×
  • Create New...