Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic drawing BendNote layer not changing

2 REPLIES 2
Reply
Message 1 of 3
mitchELAHB
244 Views, 2 Replies

Ilogic drawing BendNote layer not changing

Hello All

 

im having some strange issues with ilogic drawings.

im trying to migrate and update a heap of old drawings to our new title blocks and drawing standard and style so we can put them into vault.

ive pretty much got everything running with replacing standard, titleblock, border, dimensions and notes.

however I cannot get bend notes or bend tags to update to the new standard's default layer and corresponding default style. ive tried them as drawing notes, general notes, leader notes, drawing dimensions and general dimensions and i cannot get them to change to the new standard default layer.

 

also about to undertake each view linetype so if you have any pointers with that would also be appreciated.

 

here is a snippet of relevant sections in question.

 

	Dim oDoc As DrawingDocument
	oDoc = ThisApplication.ActiveEditDocument
	Dim oSheet As Sheet
	oSheet = oDoc.ActiveSheet

	'iterate through sheets
	For Each oSheet In oDoc.Sheets
		
		oSheet.Activate
		Dim oActObjDef As ObjectDefaultsStyle
		oActObjDef = oDoc.StylesManager.ActiveStandardStyle.ActiveObjectDefaults
		Dim oLNote As LeaderNote

		For Each oLNote In oSheet.DrawingNotes.LeaderNotes
			
			'BendNote
			If oLNote.Layer.Name <> oActObjDef.BendNoteLayer.Name
				oLNote.Layer = oActObjDef.BendNoteLayer
			End If
			If oLNote.DimensionStyle.Name <> oActObjDef.BendNoteStyle.Name
				oLNote.DimensionStyle = oActObjDef.BendNoteStyle
			End If

 

Labels (5)
2 REPLIES 2
Message 2 of 3
Michael.Navara
in reply to: mitchELAHB

For reset layer of oLNote.Layer you can set Nothing (null) to its value.

'oLNote.Layer = oActObjDef.BendNoteLayer
oLNote.Layer = Nothing

 

Message 3 of 3
mitchELAHB
in reply to: mitchELAHB

good suggestion, i did end up using that for ease of coding. however it didnt fix the problem. I managed to fix it because the Help API is a little misleading with what the bend notes are classified as. they aren't leader notes. they are their own catergory, DrawingNotes.BendNotes . but they behave like leader notes.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report