Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Here is a starter that you can work from.  It just does the first half of the job...getting the existing list of Prompts and Values, and how many of them there are.  From that point, you can reuse those two resulting array objects when you go to use them in the SetPromptTextValues method.  You would just have to either loop through those Values, or create a line for each value in the array, so you can set new values to them, before putting that array back into that second method.

 

Sub Main
	If ThisApplication.ActiveDocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
		MsgBox("A Drawing Document must be active for this rule to work. Exiting.", vbCritical, "iLogic")
		Exit Sub
	End If
	Dim oDDoc As DrawingDocument = ThisApplication.ActiveDocument
	oSheet = oDDoc.ActiveSheet
	If oSheet.AutoCADBlocks.Count > 0 Then
		For Each oABlock As AutoCADBlock In oSheet.AutoCADBlocks
			If oABlock.Name = "A0" Then
				Dim oPromptTags() As String
				Dim oValues() As String
				oABlock.GetPromptTextValues(oPromptTags, oValues)
				oCount = oPromptTags.Length
				'just for feedback only
				oPrompt = InputListBox("", oPromptTags, "", "Prompt Tags", "List Of Prompt Tags")
				'just for feedback only
				oValue = InputListBox("", oValues, "", "Values", "List Of Values")
				
				'For i As Integer = 0 To UBound(oValues)
				'	oValues(i) = "something" & " something else"
				'Next
				'or
				oValues(0) = "first value"
				oValues(1) = "second value"
				'''
				'''
				oABlock.SetPromptTextValues(oPromptTags, oValues)
			End If
		Next
	End If
End Sub

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)