Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic change row

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
jamjumpin
1876 Views, 6 Replies

iLogic change row

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.

table.JPG

 

My browser looks like this:

browser.JPG

 

 

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. 

 

6 REPLIES 6
Message 2 of 7
CCarreiras
in reply to: jamjumpin

Hi!

 

These rules work  changing the family member inside  one asssembly or a iassembly member inside the main assembly.

 

Did you find this reply helpful ? If so, use the  Mark Solutions!  Accept as Solution or Give Kudos!Kudos - Thank you!

 

 



Regards.
CCarreiras
Message 3 of 7
jamjumpin
in reply to: CCarreiras

So I can't use it within a single part, is that what you're saying?
Message 4 of 7
CCarreiras
in reply to: jamjumpin

Yes.

 

Did you find this reply helpful ? If so, use the  Mark Solutions!  Accept as Solution or Give Kudos!Kudos - Thank you!



Regards.
CCarreiras
Message 5 of 7
mrattray
in reply to: jamjumpin

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:

Capture.JPG

 

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.

Mike (not Matt) Rattray

Message 6 of 7
jamjumpin
in reply to: mrattray

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. 

Message 7 of 7
mrattray
in reply to: jamjumpin

I agree, the help for iLogic is very bad. There are a number of ideas in the idea station to improve the documentation as well as the pitiful editor that could use your vote.
Mike (not Matt) Rattray

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report