I've read so many posts and articles and still no-one can explain this clearly.
I want to write ilogic code so the user can select the frame type they're using and the iPart will update to match that member name.
I'm having so many problems with the change row ilogic and keep getting the error
"Object reference not set to an instance of an object."
I am doing this in an ipart, no assembly involved.
iPart.ChangeRow("iComponentName:1", "RowMemberName")
iComponentName, is this the name of my file? Do I put "Face" here or Face.ipt?
What does the number 1 after the colon do?
"Row member name" I assume is the text that I have in the first column of my ipart table under 'member.'
I type the following
iPart.ChangeRow("Face:1", "EX12")
And get the error "Object reference not set to an instance of an object."
I've attached a screenshot of my ipart table.
My browser looks like this:
I've read about stablising the part, but I don't understand what that means either. I thought they were referring to the part name at the top of the browser, but this never changes.
Solved! Go to Solution.
Solved by mrattray. Go to Solution.
As Carlos suggested, this is all in the context of working in an assembly containing the component in question.
@Anonymous wrote:
iComponentName, is this the name of my file? Do I put "Face" here or Face.ipt?
What does the number 1 after the colon do?
This field needs to read exaclty per the component name as it appears in the browser:
Per the above example, if we want to change row on the second component we would use "tail tack:2".
@Anonymous wrote:
"Row member name" I assume is the text that I have in the first column of my ipart table under 'member.'
This is correct.
@Anonymous wrote:
And get the error "Object reference not set to an instance of an object."
This usually means Inventor can't find whatever it is your telling it to find, in this case it means "I can't find a component named Face:1". Of course, this is because you're telling it to look in a part file, which doesn't contain components.
@Anonymous wrote:
I've read about stablising the part, but I don't understand what that means either. I thought they were referring to the part name at the top of the browser, but this never changes.
They're talking about changing the name of the component in the assembly browser pane to remove the ":X", that way it won't change as instances are added and deleted.
Thanks, I understand this all now. The tooltips for ilogic are useless, for changerow it states:
"Change current row in an ipart of assembly"
This would suggest that I could use it inside a single ipart, but as you say it doesn't work that way.