Does anyone know the property for reading/writing the next view label from the sheet properties window?
I saw this post, but it does not address how to access the next view label value from the API:
I would like to take note of it before loading a drafting standard as it looks like the drafting standard contains the information for both next view label and next datum label despite them being shown on the sheet properties page in the UI.
SolidworksApi macros
There is no way through the API alone to accomplish this, but I have found some workarounds.
I was able to accomplish this in two ways.
<p>swModel.Extension.RunCommand swCommands_e.swCommands_Sheet_Tab_Popup_Properties, ""</p><p>SendKeys "{TAB 4}"</p><p>SendKeys "^C" 'ctrl+c to copy value</p><p>SendKeys "{ENTER}"</p><p></p><p>'---run other code here---</p><p></p><p>swModel.Extension.RunCommand swCommands_e.swCommands_Sheet_Tab_Popup_Properties, ""</p><p>SendKeys "{TAB 4}"</p><p>SendKeys "^V" 'ctrl+v to paste value</p><p>SendKeys "{ENTER}"</p><p>SendKeys "{NUMLOCK}" 'may be needed to turn NUMLOCK back on due to bug in VBA</p><p></p><p></p>The {TAB 4} sends the tab key 4 times, and depending on how many times you run the code, you may or may not need to send the NUMLOCK key.
Hiee Swme Eng
What is your requirement , means by reading/writing the next view label from API what you want to do?? can you explain briefly your Aim/requirement??
The requirement seems that since loading the drafting standards resets the "Next view label:" and "Next datum label:" in the sheet properties to "A", any views (section, auxilary, detail, etc) created after the standards are updated are duplicates until you reach the last one that was created before the standards were updated.
, Another thing I forgot to mention is that I had to add the following case to swView.Type Select case from the link above to accomodate auxiliary views: