NytSkab Posted October 15, 2021 Share Posted October 15, 2021 How do I run the command "convert copy to lines" of selected objects in a script? Quote Link to comment
MullinRJ Posted October 15, 2021 Share Posted October 15, 2021 @NytSkab, Use: DoMenuTextByName('Convert Copy to Lines', 0); Raymond 1 Quote Link to comment
NytSkab Posted October 16, 2021 Author Share Posted October 16, 2021 Is it possible in the vectorscript to answer the prompt box, which apears everytime the procedure DoMenuTextByName('Convert Copy to Lines', 0) is passed? Quote Link to comment
MullinRJ Posted October 16, 2021 Share Posted October 16, 2021 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 Quote Link to comment
Pat Stanford Posted October 16, 2021 Share Posted October 16, 2021 3D view instead of Top/Plan Raymond. 😉 VW 2022 2 Quote Link to comment
MullinRJ Posted October 17, 2021 Share Posted October 17, 2021 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 1 Quote Link to comment
NytSkab Posted October 18, 2021 Author Share Posted October 18, 2021 (edited) Sorry about missing information. It is exactly 3D objects in 3D view I am converting with a python script. Is it possible to answer the dialog from the script? I am using VW 2021. Or maybe override the dialog with some kind of presetting? Edited October 18, 2021 by NytSkab Follow up Quote Link to comment
Pat Stanford Posted October 18, 2021 Share Posted October 18, 2021 As far as I know, there is not a way to accept the dialog box from inside the script. But hopefully @MullinRJ or one of the other gurus will prove me wrong and I can learn something new!! Quote Link to comment
MullinRJ Posted October 19, 2021 Share Posted October 19, 2021 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 Quote Link to comment
Pat Stanford Posted October 19, 2021 Share Posted October 19, 2021 Dang it Raymond, you are supposed to make me look bad here and tell us all the simple way to make this happen. I hate it when I am right.😠 😉 1 Quote Link to comment
MullinRJ Posted October 19, 2021 Share Posted October 19, 2021 @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. 😁 😉 😛 1 Quote Link to comment
NytSkab Posted October 24, 2021 Author Share Posted October 24, 2021 (edited) How would you integrate the function ImportImageFileN() in below script? I want to prevent the dialog, which pops up everytime the vs.DoMenuTextByName('Convert Copy to Lines',0); is passed. import vs def ListEachObject( C ): outList = [] def AddToList( h ): outList.append( h ) vs.ForEachObject( AddToList, C ) return outList for h in ListEachObject( '((VSEL=TRUE))' ): vs.DSelectAll(); vs.SetSelect(h); vs.DoMenuTextByName('Convert Copy to Lines',0); Edited October 24, 2021 by NytSkab Quote Link to comment
MullinRJ Posted October 24, 2021 Share Posted October 24, 2021 @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 1 Quote Link to comment
NytSkab Posted October 26, 2021 Author Share Posted October 26, 2021 Thank you for your assistance @MullinRJ. I will live with the dialog for now. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.