Adding custom character before item number ?

Adding custom character before item number ?

Anonymous
Not applicable
503 Views
3 Replies
Message 1 of 4

Adding custom character before item number ?

Anonymous
Not applicable

Hello all, I've been thinking adding a custom character to find balloons easily when working with pdf. Now when I search a balloon for example 8th item of BOM all 8's in the pdf is highlighted. That does not make sense to check if highlighted items are in balloons or not. But if a specific character would be before item number the only highlighted item would be balloon I'm looking for. I used "x" on the image below to emphasis what I need. Actually, I'm thinking of using whitespace (ALT+255) as leading character. So, there won’t be any sign of extra character when file is printed or viewed as pdf.

 

It doesn’t have be in the ITEM column ,an extra column for example named as ITEM2 would work as well I can assign ITEM2 to balloon default so I will be able to have same result. Hope I may express myself clearly.

 

Kind Regards.

 

Adsız.png

0 Likes
504 Views
3 Replies
Replies (3)
Message 2 of 4

wayne.brill
Collaborator
Collaborator

Hi,

 

The PartsList object in the Inventor API provides access to parts lists. The PartsListCell Value property allows you to change the text in a cell. The PartListEdit VBA example in the programming help shows how this is done. 

 

If you are having problems with the behavior of one of the API methods please provide example code that will allow me to research it.    

 

Thanks,

Wayne

 

  



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hello Wayne, thank you for your reply.

 

I used the code below, 

 

Sub PartsList1()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
oDoc.DrawingSettings.DeferUpdates = True
Dim oPL As PartsList
Set oPL = oDoc.ActiveSheet.PartsLists(1)
Dim strPrefix As String
strPrefix = "x"
Dim oCell As PartsListCell
Dim i As Long
For i = 1 To oPL.PartsListRows.Count
Set oCell = oPL.PartsListRows.Item(i).Item("ITEM")
oCell.Value = strPrefix & oPL.PartsListRows.Item(i).Item("ITEM")
Next
oDoc.DrawingSettings.DeferUpdates = False
End Sub
 

It added the character "x" to the numbers in the Item column. Script worked but when I replaced the "x" with the whitespace character Alt+0160 the space turns into normal space when idw exported to pdf. I mean when I search for " 30" ('Alt+0160'30) in pdf it returns M6 x 30 highligted. There isn't any difference between standart space and Alt+0160 in the pdf whilst there is in notepad or text editors. 

 

I tried to use U+200C from character map but when i paste copied character into VB editor it is printed screen as ???. 

 

So I wonder is there any way to use unicode character or any other solution to find balloons in pdf with find/replace dialog?

 

Thanks a lot.

Regards

0 Likes
Message 4 of 4

wayne.brill
Collaborator
Collaborator

Hi,

 

I am not finding a way to change the behavior of a space character in an Inventor drawing when exported to PDF. Please post it on the Inventor Idea station:

http://forums.autodesk.com/t5/inventor-ideastation/idb-p/v1232/tab/most-recent

 

Thanks,

Wayne



Wayne Brill
Developer Technical Services
Autodesk Developer Network

0 Likes