Jump to content
Developer Wiki and Function Reference Links ×

Convert copy to lines in script


NytSkab

Recommended Posts

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 by NytSkab
Follow up
Link to comment

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

Link to comment

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 by NytSkab
Link to comment

@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

  • Like 1
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...