Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Try statement in a Child

3 REPLIES 3
Reply
Message 1 of 4
alundr
411 Views, 3 Replies

Try statement in a Child

Can I use a try statement in a child rule?

 

Example:

Child LinearDimension_1 As :IvLinearDimension

    part1 = viewModel

    part2 = viewModel

    entity1 = "Edge1"

    entity2 = (try "Edge2" catch error "Edge3")

End Child

 

How else would I do this?  My issue is that the feature that I am placing changes entity names when it makes a completely circular hole and when it makes a partial hole.  How do I look to see what edges are visiable/usable?

 

~Andrew

WIN 7 64 

ETO 2013 R2

12 GB RAM

NVIDIA Quadro 4000

 

3 REPLIES 3
Message 2 of 4
JackGregory
in reply to: alundr

No, because the Try syntax is a "Statement" and the only thing allowed in assignments is an "Expression".  Don't forget, a Child Rule is not a statement block.  It is not procedural, doesn't return a value, etc.

 

Message 3 of 4
alundr
in reply to: JackGregory

Is there another way to check to see if the edge I'm looking for is visiable on the sheet?

 

Message 4 of 4
alundr
in reply to: JackGregory

Oddly enough, this posting answers my question ...

http://forums.autodesk.com/t5/Inventor-Engineer-to-Order/Make-the-code-continue-running-after-someth...

 

I would be game for adding the silent fail option in children.  Especially with dimensions.

example

Child LinearDimension_1 As :IvLinearDimension

    part1 = viewModel
    part2 = viewModel

    entity1 = "Edge1"

    entity2 = "Edge2"

    silentFail = True

End Child

 

 

 

 

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

Post to forums  

Autodesk Design & Make Report