<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Activate the Text Box Dialogue Box (In IDW environment) in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-the-text-box-dialogue-box-in-idw-environment/m-p/9494729#M110431</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have some time on my hands so I'm tweaking my idw templates with everything useful I can think of. I use an ilogic form to enter titleblock values etc... and on this form I also have a few rules that print to PDF with the correct rev and so on. I also wanted one to place and edit drawing notes (I haven't decided between sketch symbols or general notes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand how to place these, edit their components, delete them etc... using code but rather than adjusting the contents of the notes through the .formattedtext approach I would just like to fire up the dialogue box you get when you manually double-click on text in the IDW environment. Is this possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The notes I am looking to create might say anything and may have 10 numbered points etc...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is where I got to with a sketch symbols version (below). It opens the symbol for editing and selects the textbox..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oSketch As SketchedSymbol

For Each oSketch In oSheet.SketchedSymbols
	If Left(oSketch.Name, 5) = "Notes" Then
	Dim oSketchSketch As Sketch
	oSketch.Definition.Edit(oSketchSketch)
	NotesText = oSketchSketch.TextBoxes.Item(1)

	ThisApplication.CommandManager.DoSelect(NotesText)
	
	oSketch.Definition.ExitEdit
Else ' Do nothing
	End If
Next oSketch&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glenn&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 01:32:55 GMT</pubDate>
    <dc:creator>gcoombridge</dc:creator>
    <dc:date>2020-05-06T01:32:55Z</dc:date>
    <item>
      <title>Activate the Text Box Dialogue Box (In IDW environment)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-the-text-box-dialogue-box-in-idw-environment/m-p/9494729#M110431</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have some time on my hands so I'm tweaking my idw templates with everything useful I can think of. I use an ilogic form to enter titleblock values etc... and on this form I also have a few rules that print to PDF with the correct rev and so on. I also wanted one to place and edit drawing notes (I haven't decided between sketch symbols or general notes).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand how to place these, edit their components, delete them etc... using code but rather than adjusting the contents of the notes through the .formattedtext approach I would just like to fire up the dialogue box you get when you manually double-click on text in the IDW environment. Is this possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The notes I am looking to create might say anything and may have 10 numbered points etc...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is where I got to with a sketch symbols version (below). It opens the symbol for editing and selects the textbox..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oSketch As SketchedSymbol

For Each oSketch In oSheet.SketchedSymbols
	If Left(oSketch.Name, 5) = "Notes" Then
	Dim oSketchSketch As Sketch
	oSketch.Definition.Edit(oSketchSketch)
	NotesText = oSketchSketch.TextBoxes.Item(1)

	ThisApplication.CommandManager.DoSelect(NotesText)
	
	oSketch.Definition.ExitEdit
Else ' Do nothing
	End If
Next oSketch&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glenn&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 01:32:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-the-text-box-dialogue-box-in-idw-environment/m-p/9494729#M110431</guid>
      <dc:creator>gcoombridge</dc:creator>
      <dc:date>2020-05-06T01:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Activate the Text Box Dialogue Box (In IDW environment)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-the-text-box-dialogue-box-in-idw-environment/m-p/9495029#M110434</link>
      <description>&lt;P&gt;I worked out the approach for a sketchsymbol using the control definitions as below:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oSketch As SketchedSymbol

For Each oSketch In oSheet.SketchedSymbols
	If Left(oSketch.Name, 5) = "Notes" Then
	Dim oSketchSketch As Sketch
	
	oSketch.Definition.Edit(oSketchSketch)
	NotesText = oSketchSketch.TextBoxes.Item(1)

	ThisApplication.CommandManager.DoSelect(NotesText)

	Dim cds As ControlDefinitions
	cds = ThisApplication.CommandManager.ControlDefinitions
	
	cds.Item(2637).Execute()
'	For i = 1 To cds.Count
'		If cds.Item(i).DisplayName = "Edit Text" Then
'		MsgBox(i)
'		cds.Item(i).Execute()
'		End If
'	Next i
	
	oSketch.Definition.ExitEdit
	
Else ' Do nothing
	End If
Next oSketch&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This doesn't seem to work for general notes not inside a sketch... Can anyone explain this to me? Command 'DrawingGeneralNoteEditCtxCmd' does not seems to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
Dim oSketch As SketchedSymbol

Dim oNote As GeneralNote
oNote = oSheet.DrawingNotes.GeneralNotes.Item(1)

	ThisApplication.CommandManager.DoSelect(oNote)

	Dim cds As ControlDefinitions
	cds = ThisApplication.CommandManager.ControlDefinitions
	cds.Item(1130).Execute()
	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 04:58:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-the-text-box-dialogue-box-in-idw-environment/m-p/9495029#M110434</guid>
      <dc:creator>gcoombridge</dc:creator>
      <dc:date>2020-05-06T04:58:05Z</dc:date>
    </item>
  </channel>
</rss>

