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: 

Part List Column Width iLogic

4 REPLIES 4
Reply
Message 1 of 5
cparnell
1189 Views, 4 Replies

Part List Column Width iLogic

I found the following code on Curtis Waguespack site.

 

http://inventortrenches.blogspot.com/2011/02/ilogic-code-for-parts-lists-title.html

 
'start of iLogic code----------------------------------------------------------------------------------
'sort parts list
on error resume next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
 
Dim oPartsList1 As PartsList
oPartsList1 = oDrawDoc.ActiveSheet.PartsLists.Item(1)
'If oPartsList1 Is Nothing Then Resume Next
 
oPartsList1.Sort("PART NUMBER")
oPartsList1.Renumber
oPartsList1.SaveItemOverridesToBOM

 Is there a way to have the Collum Width bypass the predefined setting from the Styles, to have them auto adjust?

4 REPLIES 4
Message 2 of 5
adam.nagy
in reply to: cparnell

Hi,

 

Maybe I'm missing something but I did not find in the user interface where to set a column to auto-adjust. :-s

But it sounds as if you've found such a setting, but wondering about the API. If so, then where did you set auto-adjust column width in the UI?

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 5
cparnell
in reply to: cparnell

Adam:

 

I know very little about iLogic and nothing about the API. I am trying to find away to have the parts list autoadjust depending on the contents of the cell.

Message 4 of 5
adam.nagy
in reply to: cparnell

I was just wondering if you were aware of a way, that I'm missing, to set the column width through the User Interface to auto-adjust to content. I haven't found anything like that in the API either, so probably it's not possible. 😞



Adam Nagy
Autodesk Platform Services
Message 5 of 5
eljoseppo
in reply to: adam.nagy

is there a way to change the width by iLogic?

 

For Each oCustomTable In oSheet.CustomTables
	
	If oCustomTable.TableSource=77058 Then 'kBendTableSource
		
		For Each oColumn In oCustomTable.Columns
			oColumn.Title=Replace(oColumn.Title,"BEND","")
			'MessageBox.Show(oColumn.Width,oColumn.Title)
			'oColumn.Width=1.5 'why it does not work...
			'oColumn.Width=InputBox("Prompt", "Title", oColumn.Width)

		Next
	End If
Next

None of two comented lines does not change the column width. Am I missing something obvious or it's just not possible?

 

thanks

Jozef 

 

Tags (1)

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

Post to forums  

Autodesk Design & Make Report