Jump to content

MullinRJ

Member
  • Posts

    1,529
  • Joined

  • Last visited

Reputation

245 Spectacular

6 Followers

Personal Information

  • Occupation
    Circuit Board Designer
  • Location
    United States

Recent Profile Visitors

2,549 profile views
  1. @NytSkab, If I understand the gist of your question, there is no way to use ImportImageFileN() to suppress the dialog in DoMenuTextByName('Convert Copy to Lines', 0). If you were importing images, you would use the function ImportImageFileN() inline, as you would use ImportImageFile(). But you want an option that does not yet exist for converting copies of 3D objects to lines without a dialog. You will have to request that new functionality from VW Engineering. Use the Wishlist - Feature and Content Requests section of this forum to enter your request. The only reason I mentioned ImportImageFileN() was as an example of a function that originally presented a dialog in ImportImageFile() which was introduced in VW 2014, and then someone (a user or an employee, I don't know which) requested the newer function which had the same features as ImportImageFile(), but without the dialog. ImportImageFileN() was implemented the next year (2015). You will have to request the functionality you desire from Engineering, and hope they will release it in the next VW version. In your Wishlist Request I'd also include the reasons you think it is important, like the number of objects you convert each time you run your script, and the number of times you would potentially use the new feature if it existed. Raymond
  2. @michaelk, Your array of handles needs to be an array of handles to the DOOR RECORDs, and not the DOOR INSTANCE handles. With the handles to records you can access the field with the third argument of SortArray(). Plus, everything Josh said. Raymond
  3. @michaelk, Try two scripts. First script: VSave('test'); SetView(#-90d,#0d,#0d,0",0",0"); Second script: VRestore('test'); Unless your eyes are really, really quick (or your computer is really, really slow), you'll never see a view change between the VSave and VRestore in a single three line script. I'm not at all sure what you are trying to do, but often it is recommended NOT to change the view in a plug-in. Good luck. Raymond
  4. @Pat Stanford, I gave up making people look bad for my New Year's Resolution, but January's coming back around in about 10-11 weeks, so I can resume again next year. I'll put you at the top of my list, if you like. 😁 😉 😛
  5. Sorry, I do not have a way to dismiss a dialog as you desire. The only way I've seen this work in the past is to request a new VectorScript function from the MotherShip that has a "No Dialog" feature built in. As an example ImportImageFile() and ImportImageFileN(), where the latter function (issued a year after the former) uses the setting of the last invocation of the dialog, and only pops the dialog once if the dialog was never presented. Raymond
  6. Hi @Pat Stanford, It appears the dialog only shows for 3D objects. 2D objects (screen and layer planes) don't invoke the dialog even in 3D views. 3D objects will invoke the dialog even in Top/Plan. In rereading the earlier posts that little tidbit was missing. Thanks for turning on the room light, though. 🙄 Raymond
  7. What dialog box? What VW version(s)? What object types are you trying to convert? More info, please. I see no dialogs in VW 2019 - VW 2022. Raymond
  8. @NytSkab, Use: DoMenuTextByName('Convert Copy to Lines', 0); Raymond
  9. @michaelk, Why not place your symbol, rotate it in 3D (or set its 3D angles), THEN convert it to a group? If it is a Hybrid Symbol, you will be limited to Z-axis rotations only. If it is a Hybrid Symbol and you want XY-axis rotations, duplicate the symbol definition, remove all 2D parts, then place the new symbol, rotate, and "explode". Delete the duplicate if desired. Raymond
  10. @Joe Pierre, This seems like it should be a simple thing to do, but it is not. Additionally, there are probably multiple ways to script a solution. Here's a short script that may suit your needs. If not, you are free to modify it until it does. PROCEDURE DecIn_FracFtIn; { Toggle between decimal INCHES and fractional Feet-Inches. } { This script should be customized to meet individual needs. } { 26 September 2021 - Ray Mullin. No warranties expressed or implied. } { Excessive use may cause finger cramps. Use responsibly. } { Script BEEPS when decimal Inches are applied. } Procedure ResetDims(H :Handle); Begin ResetObject(H); End; { ResetDims } BEGIN if (GetPrefInt(170) = 1) then begin { if Feet-Inches } SetPrefInt(170, 2); { Units = Inches } SetPref(168, FALSE); { False = Decimal } SetPref(163, TRUE); { Show unit mark } ForEachObject(ResetDims, T=Dimension); { reset all dimension objects } SysBeep; { Beep for INCHES } end else begin { if Inches (or another unit) } SetPrefInt(170, 1); { Units = Feet-Inches } SetPref(168, TRUE); { True = Fractional } SetPref(175, FALSE); { Rounding Style True = Exact as fractions; False = Non-exact as decimal } SetPrefLongInt(172, 2); { Dimension Fractional Precision (0-6); 1=1/2, ..., 6=1/64 } end; END; Run(DecIn_FracFtIn); Interestingly, dimensions will reformat when the units are changed to Feet-Inches, but they must be manually reset when changing to Inches. Go figure. HTH, Raymond
  11. @Poot, In my best imitation of Frank Morgan (Wizard of Oz), "Well, bust my buttons! Why didn't you say that in the first place? That's a horse of a different color!" With a custom routine, 3D Poly lengths can be measured. Here's a new version. Procedure SelectShort3DPolys; { Selects all 2-vertex 3D Polygons in the active layer shorter than a user } { entered length. } {Augsut (sic) 2, 2017} {© 2017, Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied. Use at your own peril.} {Abandon hope all ye who enter here. There be dragons.} { 22 September 2021 - modified to select 2-vertex 3D Polys instead of Lines. - Raymond Mullin } { 23 September 2021 - modified to measure length of multi-vertex 3D Polys. - Raymond Mullin } { All of Pat's warnings remain in effect. } Const CR = chr(13); { Carriage Return char } Var H1 :Handle; OLength :Real; Function PolyLen3D (H :Handle) :Real; Var I :Integer; L :Real; P0, P1 :Vector; Begin L := 0; GetPolyPt3D(H, 0, P0.x, P0.y, P0.z); for I := 1 to GetVertNum(H)-1 do begin GetPolyPt3D(H, I, P1.x, P1.y, P1.z); L := L + Norm(P1-P0); P0 := P1; end; { for } if IsPolyClosed(H) then begin GetPolyPt3D(H, 0, P1.x, P1.y, P1.z); L := L + Norm(P1-P0); end; { if } PolyLen3D := L; End; { PolyLen3D } Procedure DoIt(H2:Handle); Begin if (PolyLen3D(H2) <= OLength) then SetSelect(H2); End; { DoIt } Begin DSelectAll; OLength := RealDialog(concat('Enter Maximum 3D Poly Length.', CR, 'All 3D Polys on the active layer shorter or equal to this length will be selected'), '1'); if (OLength > 0) then ForEachObject(DoIt, T=Poly3D) else AlrtDialog('Length must be greater than zero'); End; Run(SelectShort3DPolys); HTH, Raymond
  12. Pat seems to be indisposed at the moment. I modified his script to select 3D Polys instead of Lines. I also assumed you meant 3D Polys with two vertices. This script will not select 3D Polys with three or more vertices. That will take more code. Let me know if I assumed correctly. HTH, Raymond
  13. OS 10.15.x is the minimum for VW 2022. I am using a MacMini (late 2012) and it runs well, even with the "under powered" onboard graphics chips (also, I don't do rendering). One caveat - OS 10.15.x does not run 32 bit applications any more, so if you have old software you need to use, consider that before upgrading your OS. Raymond
  14. Josh, Based on your last comment, this may not be related, but another way to get a locus is to delete a SymDef when that Symbol is still in the drawing. You mentioned Locus which I interpret as a 2D Locus. Deleting a SymDef would leave 3D Loci in the drawing. If you are getting a 2D Locus, then this is not the reason why. Raymond
×
×
  • Create New...