Jump to content

Sam Jones

Member
  • Posts

    1,191
  • Joined

  • Last visited

Everything posted by Sam Jones

  1. Setting Pref 1055 does not seem to work; that is, the Grey Others while editing setting does not seem to change when you actually edit. It is more likely that I'm missing something. Because I could not get it to work, I expanded the script to the following for testing. PROCEDURE GreyOthersYesNo; VAR GreyPref :BOOLEAN; BEGIN GreyPref := GetPref(1055); AlrtDialog(concat('Pref 1055 was ', GreyPref)); IF GreyPref THEN SetPref(1055, FALSE) ELSE SetPref(1055, TRUE); END; RUN(GreyOthersYesNo); I have attached a file with the script and some grouped objects. Grey Others Test.vwx
  2. I think that explains the difference. Your result provides the VP Center on the sheet layer, and my code computes the needed delta to center the VP on the page. Cool. I understand better now.
  3. Jesse, Thank you! You nailed it. Except that it should be result.x:=A.x - Origin.x; result.y:=A.y - Origin.y; Still, you found the magic sauce: GetOriginInDocUnits(Origin.x,Origin.y); I had done a get origin at the beginning of the command, but manipulating the VP in the doc units was crucial in moving the VP to the correct location. 👍👍 {IF the Viewport is not in the center of the sheet layer, center it on 0,0} GetOriginInDocUnits(OriginBx, OriginBy); HCenter(TrussTapeVP, X1, Y1); DeltaX := X1 - OriginBx; DeltaY := Y1 - OriginBy; HMove(TrussTapeVP, DeltaX, DeltaY);
  4. I apologize for being so late to the party, but what is "remote debugging"
  5. A Ah. That's the issue. If the user origin is not moved there is no problem. I need to know where, on the sheet layer, the VP ended up if, at the beginning of the whole process the user origin has beem moved away from the document/page origin.
  6. Why are you doing this? You seem to be setting the layer scale of the viewport to 12. 12??
  7. I tried to get the handle to the viewport handle with FSActLayer(sheetLayerHandle), and got 0, 0 back even though the VP was not at 0,0. Before I dive deep into the above, have you been working with objects in a drawing whose user origin has been moved?
  8. OK, the process, in VW 2022. 1. Create a design layer 2. Create objects from X1 to X2 all at (X#, 0). 3. Select All 4. Create Viewport with TheVP := CreateVP(ParentSheetLayer); 5. Try HCenter(TheVP, vpX, vpY vpX and vpY return 0,0 unless the origin has been moved; in which case they return other stuff. What you are doing is getting the handle of the first object on the sheet layer and assuming that it is the viewport. That might actually work for me but what if there are other viewports, or even objects on the sheet layer? I'll try some stuff and see if I can get it to work. Thanks,
  9. The command Scott is talking about is called "Collect & Total Weight". It will create a worksheet and list all the selected objects with their weights, both imperial and metric, and total both. Objects with no weight are listed and colored red. You can enter your own weight amounts to correct "0" entries or override other weights you feel are inaccurate. The command is one of the 140 plus commands in AutoPlot Tools for Spotlight. HTH
  10. Is it possible to get the location of a viewport on its sheet layer? HCenter(ViewPort, X1, Y1); yields its location on the source design layer. I would like to locate it on the sheet layer. If the user origin has not been moved and I create a VP with a location of 0,0 on a design layer, it ends up at 0,0 on the parent sheet layer. If the user origin has been moved the VP ends up somewhere else. If I make the parent sheet layer active, and select the viewport, I can send it back to 0,0 (the center of the page), by entering 0 in the X and Y coordinates in the OIP. So, in VS, how would I get the location of the VP on the sheet layer so that I can move the VP with and HMove() call? 😊😇
  11. As I said above, always good to check. However, that's a great advert for the HP Laser Jet Pro and its drivvers.
  12. Interesting? Yes. Who's got the time and all 3 printers. Actually, I know a guy, but he doesn't have the time. ...or care. He's been sending everyone PDFs and carrying E size plotter prints to the job. If he's not slaving away on the next corporate gig, he's walking his dogs, grilling, or working on the next item on the honey do list.
  13. That's interesting, and would make a great meeting topic In that particular case there is a lot to the difference between sheet layer and PDF. Mainly, my users find it very difficult to make the page description work. PDFs put another layer between the user and the printer. AP Truss Tapes create 12in X 3in pages on the sheet layer, and allocate enough pages to be as long as the truss, plus some extra for end labels and markers. The viewport is then centered on the page. The Epson printer drivers allow for the creation of a 12in X 3in pages. When this is done by a PDF and then sent to the printer there seems to be a hiccup between the PDF printer page description and the printer driver page description. I haven't investigated deeply. I just tell people to print from the sheet layer.
  14. That's a bit severe. Printing truss tapes described above works best from the sheet layer containing the viewport. I have also seen PDFs print off scale by the same small amounts. My experience seems to show it is the computer/printer interface that is the main issue. One might get better results with PDFs, but all print outs need to be checked for accuracy depending on your tolerance for deviation. That is why dimensions are placed on the drawing. Dimensions should be placed on all construction documents in all disciplines. My 2¢
  15. Hate to say it guys. Printers have never been accurate. Ok, sometimes they are, but that is usually dumb luck. Kevin seems to be saying that he does well with PDFs, but if one needs accuracy, one needs to check the print out. Using Truss tapes and the TM-T20II and with others using the TM-T20III we have found that accuracy varies with different papers, and different instances of the same printer. We solve this by creating a 1:1 scale viewport of the tape to be printed. The truss tape has a ruler on it and sample prints are made. The scale of the viewport is adjusted away from 1:1 to fine tune the result. With the cheap 3" Amazon paper, we have found a viewport scale of 0.989 usually works well, but that setting cannot be counted on between printers. We have found that once a printer setting is found, it holds from session to session. Michael's scale error seems larger than what we usually deal with, but I have heard of large scale adjustments. They work, but are usually the result of some strange configuration of the drawing or printer. Still Michael's scale difference seems large. Michael, you should try printing to a viewport and find out what the scale adjustment is needed to get more accuracy. HTH.
  16. No debugger?? I didn't know that. Beginning programmer? No debugger?? If you learned to program prior to coming to VW macro programming maybe python, after all it is what you learned, but without having learned Python first, hands down use vectorscript. Period. I'm sure there will be continued discussion on this, but there shouldn't be. Prior to coming to MiniCAD and vectorscript, I had learned PL-1, Forrtan, Pascal, and Forth. Yes, Forth, the fastest, most obscure, stack programming language. . I was using Forth on an Apple II for god sakesl That anyone would want to introduce someone new to programming using a language that is space sensitive, uses white space as a meaningful delimiter, has no variable type checking, and has no integrated debugger is madness. I was on the fence before; not now. If you know Python, go for it. String handling, and outside libraries are a big plus; although, I don' know how outside libraries are handled by encryption, or how encryption might be hobbled by outside libraries. If you're new to programming use vectorscript. You will get farther faster.
  17. Thanks Julian, I need to get the active text size at the start of when a plug-in is run so that I can return it to that size at the end of plug-in execution. I'm pretty sure this would be a document setting, but I'm not positive.
  18. How would someone get the current document text size setting? CurrSize := GetPrefReal(57); Yields a very large value that makes no sense to me. I tried the "Waldo" technique of trying to create a text object and using GetText() but I could not get a handle to use for GetText. So... ?
  19. Yes, logging into the university first let's me enroll. Thanks.
  20. Put in an enhancement request and then let us know that you have done, so we can go to it and vote it up.
  21. Oh yea, the delimiter needs to be a forward slash, and you got that.
  22. I have always had to specify the exact path. That exact path could be relative to the calling routine, but the path had to include the exact names/path of the location of the included file. The included file has always has to be a sub folder if the path is relative. I'm not sure if any of this has to do with your question.
×
×
  • Create New...