Part List Column Width iLogic

Part List Column Width iLogic

Anonymous
Not applicable
1,326 Views
4 Replies
Message 1 of 5

Part List Column Width iLogic

Anonymous
Not applicable

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?

0 Likes
1,327 Views
4 Replies
Replies (4)
Message 2 of 5

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 3 of 5

Anonymous
Not applicable

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.

0 Likes
Message 4 of 5

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes
Message 5 of 5

Anonymous
Not applicable

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 

 

0 Likes