iProp Wiz conflict with iLogic code?

iProp Wiz conflict with iLogic code?

RNDinov8r
Collaborator Collaborator
496 Views
5 Replies
Message 1 of 6

iProp Wiz conflict with iLogic code?

RNDinov8r
Collaborator
Collaborator

So we are moving to an ERP system here soon. The Company is Genius if that matters. In anticipation of this, I have started to add or manipulate data fields which they will require when we import our assemblies into their ERP program. I have used iLogic to accomplish this:

SyntaxEditor Code Snippet

'this code converts the Part Number to a custom iProperty that can be read by genius.
iProperties.Value("Project", "Part Number") = iProperties.Value("Custom", "Item_Description")

 Currently this is a requiement to get the part number to translate over to the Genius software (since they can't use "Part Number" from the actual iProperties for some reason. In any case, this was the iLogic I wrote to accomplish what we need.

 

We have now discovered that some - not all - files that are created with the .ipt template that have this iLogic code don't show the Part Number in the field in iProp Wiz (or on an Inventor BOM for that matter). iPropWiz is pulling the Part Number for the iProperty "Part Number", so it's not a wierd alias or something like that. I have attached one part (-034) which will not show the Part Number, and one part which does show the part number (-025). It could jsut be that my iLogic is not "well written" for all of it's brevity. What I do know, is once I delete that iLogic code, my Part Number field fills in both the BOM and in iPropWiz

NoPartNo.png

0 Likes
Accepted solutions (2)
497 Views
5 Replies
Replies (5)
Message 2 of 6

RNDinov8r
Collaborator
Collaborator

I forgot to mention, I'm running IV2016 Pro on Win 7 station.

0 Likes
Message 3 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@RNDinov8r,

 

You could use below iLogic code to update part number iProperties in Part template.

 

'this code converts the Part Number to a custom iProperty that can be read by genius.
iProperties.Value("Project", "Part Number") = iProperties.Value("Custom", "Item_Description")

If iProperties.Value("Project", "Part Number") = "" Then

	iProperties.Value("Project", "Part Number") = ThisDoc.FileName(False) 'without extension

End If

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 6

RNDinov8r
Collaborator
Collaborator

Thanks Chandra,

 

I'll give this a try and report back. I guess I dont' understand why it appears that my iLogic cause my Part Number to overwrite itself with nothing. My assumption is that it has something to do with the iPropWiz code.

0 Likes
Message 5 of 6

RNDinov8r
Collaborator
Collaborator

That appears to have done the Trick

0 Likes
Message 6 of 6

rayessle
Advocate
Advocate
Accepted solution

the code

iProperties.Value("Project", "Part Number") = iProperties.Value("Custom", "Item_Description")

places the custom item description property into the part number. I think you want the opposite to happen so the code should be

iProperties.Value("Custom", "Item_Description") = iProperties.Value("Project", "Part Number")

 

this would place the Part Number property into the Item_Description property.

If you don't have anything in the Item_Description property then the part number would become empty using the original code.

 

This code would also do what you want.

iProperties.Value("Custom", "Item_Description") = "=<Part Number>"

 

 

 

 

 

0 Likes