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

I worked out the approach for a sketchsymbol using the control definitions as below:

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

 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?

 

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()
	

  

Use iLogic Copy? Please consider voting for this long overdue idea (not mine):https://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399