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: 

Change PL Header on Drawing Via iLogic?

2 REPLIES 2
Reply
Message 1 of 3
obourne
423 Views, 2 Replies

Change PL Header on Drawing Via iLogic?

Hi,

I want to be able to change the header on a PL in a drawing using iLogic.

 

I'm able to "find" the PL(s) on a drawing but can't seem to figure out how to access the header propoertyy My goal to to change the header to show the P/N of the assembly/part it's created from.

 

My Current code is below:

doc=ThisDrawing.Document
oBOMs=doc.DrawingBOMs

For Each oBOM In oBOMs
MessageBox.Show("Found a PL", "Title")
Next oBom

In between the for/next loop is where I want to access the current BOM and change it's header depending on the related .iam/.ipt.

 

Any ideas?

2 REPLIES 2
Message 2 of 3
Curtis_Waguespack
in reply to: obourne

Hi obourne,

 

Here is a quick example.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

oDocument = ThisDoc.Document
Try
	'look for the first parts list on the drawing
	Dim oPartsList As PartsList
	oPartsList = oDocument.ActiveSheet.PartsLists.Item(1)
	oPartsList.Title = "Hello World"
Catch
	'inform user no parts list was found
	MessageBox.Show("Parts List Not Found", "iLogic")
End Try

 

Message 3 of 3

Hello Curtis,

 

I am looking to use your code.

I also have additional parts Lists (tabulation) on the same drawing.

I would place the first part and attach the PL, then place another PL via the "browse" button.

How would I use this code to replace the PL title on a new PL, whenever a new PL is placed from browse?

 

I greatly appreciate any help you could provide.

Thanks,

 

Len

Senior Designer/Cad Administrator
Inventor 2012, w/SP2
Vault Collaboration 2012
Dell Precision T3500, Intel Xeon CPU
W3680 @3.33GHz, 16.0 GB of RAM
Microsoft Windows 7 Pro, 64 Bit Edition
Version 2009, w/SP1

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

Post to forums  

Autodesk Design & Make Report