Prompt Entry

Prompt Entry

fitriakem
Explorer Explorer
253 Views
3 Replies
Message 1 of 4

Prompt Entry

fitriakem
Explorer
Explorer

Hi.

 

I need to create prompt entry in multiple sheet but with different value and i've make prompt entry as an iproperties custom to set at Form. But, when i insert value, i found that every sheet i create has same value.

 

Dim oSheet As Sheet = ActiveSheet.Sheet
Dim oBorder As Inventor.Border = oSheet.Border
If oBorder Is Nothing Then Return
Dim oPromptTextBox As TextBox
For Each oTextBox As TextBox In oBorder.Definition.Sketch.TextBoxes
	If (oTextBox.Text = "<ITEM>") Then 
		oPromptTextBox = oTextBox
		Continue For
	End If
Next
	If oPromptTextBox Is Nothing Then Return
		Dim oPromptEntry = oBorder.GetResultText(oPromptTextBox)
Dim result As String = InputBox("Input ITEM Value", "ITEM", oPromptEntry)
oBorder.SetPromptResultText(oPromptTextBox, result)

iProperties.Value("Custom", "ITEM") = ITEM

 

0 Likes
254 Views
3 Replies
Replies (3)
Message 2 of 4

marcin_otręba
Advisor
Advisor

maybe you could sheare you empty idw file with that border ?

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 3 of 4

C_Haines_ENG
Collaborator
Collaborator

Your code doesn't seem to make sense. You are setting the iProperty to the "ITEM" variable but you haven't declared that anywhere. Since "ITEM" isn't declared anywhere it will just put a blank value. 

 

iProperties.Value("Custom", "ITEM") = result

 

0 Likes
Message 4 of 4

mslosar
Advisor
Advisor

Also, prompted entries are saved on a per sheet basis. If you try and set those values either to or from iproperties, you're going to overwrite the property at each sheet.  You'd need to create an iproperty for each sheets value to keep them separate.

0 Likes