IV9 - Setting PartsListColumns Width to zero removes column, possible bug!

IV9 - Setting PartsListColumns Width to zero removes column, possible bug!

Anonymous
Not applicable
416 Views
3 Replies
Message 1 of 4

IV9 - Setting PartsListColumns Width to zero removes column, possible bug!

Anonymous
Not applicable
I found that setting column width to 0 removes the column from partslist. Public Sub TestPartsListRemove() Dim oDrawDoc As DrawingDocument Dim oPartList As PartsList Dim oPartsListColumn As PartsListColumn Set oDrawDoc = ThisApplication.ActiveDocument Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1) For i = 1 To oPartList.PartsListColumns.Count 'This removes column from partslist. Possible bug! oPartList.PartsListColumns.Item(i).Width = 0 'Correct way to remove column 'oPartList.PartsListColumns.Item(i).Remove Next i Set oDrawDoc = Nothing Set oPartList = Nothing Set oPartsListColumn = Nothing End Sub
0 Likes
417 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I've experienced a problem related to this. I sent a message recently about the posibility of "hiding" a column in a parts list. It was suggested that I set the column width to zero. At first, I though I had a solution to my problem but I've found that I can't resore the column for viewing. FYI
0 Likes
Message 3 of 4

Anonymous
Not applicable
Try setting it to 0.001, its still there but it aint visible
Regards
MattH
0 Likes
Message 4 of 4

Anonymous
Not applicable
I tried this on R9 SP1, and setting the column width to 0 does not remove the column from the parts list. To verify, first run the macro in the first post (this will set all the column widths to 0) and then run it again with the following line changed: oPartList.PartsListColumns.Item(i).Width = 2 This will set all column widths to 2 and will become visible again. So there are no API defects as far as I can tell. However, the parts list dialog doesn't behave too well after having set all widths to 0. The columns are still there, but it requires special skill to make them visible again :-). In the 'Edit Parts List' dialog, you need to drag the columns out again. They seem to snap back to 0 width at the end of the drag, but if you hit 'Apply' and then 'OK' the columns do show up. Sanjay- "MattH" wrote in message news:29370664.1103130830564.JavaMail.jive@jiveforum2.autodesk.com... > Try setting it to 0.001, its still there but it aint visible > Regards > MattH
0 Likes