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: 

How do you change the browser node name in a drawing?

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
GosponZ
3503 Views, 14 Replies

How do you change the browser node name in a drawing?

Is it possible to make iLogic rule to do this:

In dwg Place part and in Browser to see part name without extra typing. Not Sheet 1 sheet 2 etc.

That would be huge help.

 

Thank you

14 REPLIES 14
Message 2 of 15
jdkriek
in reply to: GosponZ

Here you go:

 

If (ThisDrawing.ModelDocument Is Nothing) Then Return
	modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
	ActiveSheet.Sheet.Name = iProperties.Value(modelName, "Project", "Part Number")
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 3 of 15
GosponZ
in reply to: jdkriek

Thanks for  such fast reply but here is one error could you take look please.

Thank you

Message 4 of 15
jdkriek
in reply to: GosponZ

I'm not getting that error in 2011-2013

 

Is there anything else in the iLogic rule? Can you post it?

 

To make sure it's copied correctly you can also copy and paste from this .txt file attached.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 5 of 15
GosponZ
in reply to: jdkriek

Thanks a lot now is working perfect

Message 6 of 15
jdkriek
in reply to: GosponZ

Glad it works for you 😉

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 7 of 15
GosponZ
in reply to: jdkriek

Jonathan,

when i try first time it work perfect. Now i'm trying and every time in new sheet giving me same name

Thank you

Message 8 of 15
jdkriek
in reply to: GosponZ

Ah multiple sheets with diffrent parts? Try this.

 

oDoc = ThisDoc.Document
oSheets = oDoc.Sheets
	For Each oSheet In oSheets
		oSheet.activate
		oView = oSheet.DrawingViews.Item(1)
		modelName = oView.ReferencedDocumentDescriptor.ReferencedDocument
		oProp = modelName.PropertySets.Item("Design Tracking Properties")
		ActiveSheet.Sheet.Name = oProp.Item("Part Number").Value 
	Next
oSheets(1).activate
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 9 of 15
GosponZ
in reply to: jdkriek

I copy paste straight from web and that is not good idea. I place code into word and then i copy paste into rule and is working like charm. Thanks a lot

Message 10 of 15
jdkriek
in reply to: GosponZ

You're quite welcome 😉

 

And yes, paste directly into a .txt file before pasting into iLogic.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 11 of 15
peter
in reply to: GosponZ

Sorry to bring up an old thread but this code isn't working in Inventor 2014. Any ideas?

Message 12 of 15
GosponZ
in reply to: peter

Man i'm still on 2012. Is there anybody to try with 2014

Message 13 of 15
GosponZ
in reply to: GosponZ

In 2014 code is working perfect. Not single problem. 

Message 14 of 15
jmaheta
in reply to: jdkriek

thats genius work. thanks. 

Message 15 of 15
aronmatheus
in reply to: jdkriek

Hi@jdkriek I'm trying to think of a ruler same you did not lose the link with the parameter when using ilogic, I put a video to show what I wanna do.

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

Post to forums  

Autodesk Design & Make Report