Jump to content
Developer Wiki and Function Reference Links ×

What to add to - Align/Distribute 3D - simple DoMenuTextByName script ?


Recommended Posts

Hopefully someone will tell me that I am wrong, but I don't believe there there are any script commands to interact with dialog boxes generated by menu commands run by DoMenuText.

 

I think if you really want that functionality, your script will basically have to recreate what Align/Distribute 3D does.

 

Sorry.  😞

 

 

Link to comment

@Pat Stanford is right — again. 😉 (A nod to consistency.)

 

   While you can't force a dialog into a known state via script, if you use the dialog once, it will remember its last state. Subsequent calls will open with the same settings as the last time. This memory doesn't persist across VW sessions, but it will remain as long as VW stays open. 

 

   If you use the command a lot while you're working, you can benefit from setting it up initially. If you only use it occasionally, then my advice won't save you much, if any, time.

 

Raymond

Link to comment
7 hours ago, MullinRJ said:

While you can't force a dialog into a known state via script, if you use the dialog once, it will remember its last state. Subsequent calls will open with the same settings as the last time. This memory doesn't persist across VW sessions, but it will remain as long as VW stays open

 I don't think this is true.  In my experience, dialogs only remember if the "Rpstr_ ..." commands to save values to the VectorScript value repository, and these values are only remembered during the current VW session.  One can use the "SetSavedSetting()" and "GetSavedSetting()" commands to set and retrieve dialog settings during and between VW sessions.  I defer to @JBenghiat for the source of all VS truth.

Link to comment

Hi @Sam Jones,

   While the repository exists for storing and retrieving temporary settings, how do you propose finding anything in there that you did not place yourself? What names are available? The dialog in question is a stock dialog, factory owned and operated, and while it may be true that someone at the factory may inform you of a setting's name, this is not expected to be common practice. 

 

   Perhaps we might all benefit if someone were to post a VE to request such a list be published. Innnnn the meantime – WWJBD? 😉

 

Raymond

Link to comment

I believe almost all dialogs use the SavedSettings calls. The saved settings get read from an xml file and written to the xml file on quit. One could look at the saved settings files in the user folder and see if the Alignment dialog settings are there, and then change the xml values in memory before running the menu command. 
You may be able to find dialog controls on the OS level (On the Mac, Automator, Better Touch Tool, or Alfred may provide a solution). I believe all the options have modifier shorty, so even a macro that called the dialog and fired those would work. 
Or the other way to skin the cat is write a series of scripts that align and distribute objects according to your desired parameters. 

Link to comment

Unfortunately, it does not look like the Align/Distribute 3D is one of the tools that uses Saved Settings.

 

I looked in SavedSettings.XML, SavedSettingsDialog.xml, SavedSettignsRsrcMgr.xml and SavedSettingsUsr.xml.  I could not find the parameters saved there. And when I restarted VW, the dialog opened without the previous settings.

 

SavedSettingsUser.xml does contain a section for Align Distribute

 

  <AlignDistribute>
    <DlgAlignDistribute3D>
      <x>2517</x>
      <y>282</y>
      <width>597</width>
      <height>362</height>
    </DlgAlignDistribute3D>
  </AlignDistribute>

 

But this looks to be the location and size of the dialog box only.

 

Looks like Sam is probably right about this one using the Repository calls to store information during the current VW run.

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...