Hello.
When generating parts from the part factory I get the error message "Error on line 5 in rule: Get File And Path Name". I can click "ok" and it continues to the next part where the message is displayed again. I checked the rule "Get File And Path Name" and it contains actually just three lines.
Very strange. What might cause this issue?
@Dulli2
Can you share the code for the rule? Also, I'm moving this to the iLogic forum so that the right people can take a look at it.
Chris Benner
Industry Community Manager – Design & Manufacturing
If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
Also be generous with Likes! Thank you and enjoy!
Hi @Dulli2. When an error message pops up from an iLogic rule, there are usually 2 tabs to that little dialog. Could you please post what both of them say here, so we can bet a better understanding of what may be going wrong. If it is not in English, would you mind posting the text here, instead of just screen captured images? The most common problems with the lines of code you are showing are:
Wesley Crihfield
(Not an Autodesk Employee)
You mentioned part factory. If the rule is an ipart factory and then it runs on the member file this will be read only. The result will be the rule trying to write the filename to the parameter which result in error. Let us know what document your running the rule in. And if it is modifiable.
Hello @A.Acheson and @WCrihfield .
Below the error box that pops up.
1) I opened the ipart and generated parts from it. It works, but the message pops up for every generated part of the family.
2) When placing such parts in an assembly and when saving the assembly the same box appears.
Parts are not read-only.
Actually, one of the iparts where this happens does not contain this rule.
I suggest to remove the internal rule from the ipart factory completely. You can run it as an external rule in the factory to perform the parameter population by looping over all members. iParts are not designed to have ilogic rules in them.
@A.AchesonTo clarify one thing, when you talk about the iparts, do you mean the members or the parametric model the members are created with?
I get the same result after deleting the rule. The error is actually related to the members in the list and not the governing one.
Simply deleting the rule doesn’t remove it from existing members. Remove the rule and event trigger in the factory file. The factory is the main part with the table the members are derived from. It has all the keys used to select a specific member.
Generate the members
Select rebuild all and then generate the member. You will get a save dialogue box this is the new member overwriting the old on the desktop location. If you want open the member file location and you can see the time changing on the file save. You know then it is overwritten. Open this file and there should be no trace of ilogic rule.
Here is the iPart factory object if you ever want to work with the factory directly using the API.
Thanks for leading to the right direction. It was not enough to do the rebuild. I had to delete all members from the folder and generate them again. After the error has disappeared.
Can't find what you're looking for? Ask the community or share your knowledge.