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: 

Make the code continue running after something fails

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
653 Views, 6 Replies

Make the code continue running after something fails

Hello.

 

I am trying to automate drawing generation using Intent, and I usually get an error where Intent can't find an entity that is there, I have even tried not naming the entity and using incremental adoption so that Intent can name it but for some reason it can't find that entity which it named. This is not a really big problem as the drawings are then revised and modified manually to meet final standards. My real problem is that anytime Intent finds this kind of error it stops so I have to go into the code, delete the dimension which fails and then run it again, and this can happen 5 or 6 times in a single drawing (specially when using section views) so I was wandering if there is a way to make Intent skip the dimension if it doesn't find an entity.

 

Thanks in advance.

6 REPLIES 6
Message 2 of 7
Chris.Palmatier
in reply to: Anonymous

You don't mention the version you are using, but there is a known issue in 2011 when using work features to create dimensions and updating drawings. The symptoms of this issue are that the entities are created properly the first time you create a drawing, but fail when updating a drawing. The workaround is to delete the drawing file and create it from scratch each time. 

 

Not exactly the response you were looking for, but I hope this helps.

 

 



Chris Palmatier
Customer Success Engineer
Inventor Engineer-to-Order

Message 3 of 7
Anonymous
in reply to: Anonymous

Thank You Chris, I am using Intent 2011 and I am aware of both that issue and that workaround (actually I made the habit of deleting the past drawings before generating new ones), but the entities I am refering to are Faces, Edged and Vertices; that workaround do not work for these kind of entities as it works mainly on "projected" work features.

 

I made my peace with this anyway, so my real problem is to find a way to run the complete code even if 5 or 6 dimensions are not generated because its entities cannot be found.

 

As my code is suposed to be eventually used by other people not familiarized with my code (or with Intent in general) they will not be able to use my workaroud which consist on getting inside the code and deleting the dimension that is causing trouble.

 

What I really need is to skip the exception and so the dawing generation is not stoped even if some dimensions are not placed because these will be noticed on the final revision.

 

I tought that the "Try...Catch" command could help, but as I kept reading I cant find a way to use it.

Message 4 of 7
Anonymous
in reply to: Anonymous

Have you ever found a way to do what you were asking for?

I also have a need for this.

Morgan

Message 5 of 7
Anonymous
in reply to: Anonymous

Hi,

 

I would like my application to have this behavior too!

 

Still no solution to do it?

 

 

Thanks

Message 6 of 7
JackGregory
in reply to: Anonymous

Generally speaking, reviving a thread this old is bad practice; better to create a new one with a link to the old.  The problem is that old answers and conditions may not apply to newer versions, and so on.

 

But, let's understand the new question:  Is the desire that Intent somehow be deliberate in ignoring a problem that rules told it to create?  Isn't silent failure a terrible sin (you will never know if it worked or not)?  I would like to understand the underlying need here.

 

We know that drawings are problematic because Inventor does not consistently project the same things after each update.  This is why merely adopting dimensions doesn't always work.  So the solution has always been to create workfeatures that you can dimension to, and you can be sure of their (rule-based) placement.  We technically can create "do it if you can" dimensions (by using try-catch), but it is hard to understand how that would help.

Message 7 of 7
Anonymous
in reply to: JackGregory

I'm used to work with workfeatures, but looking at the quantity of dimensions on the drawings, my parts would be full of workentities if I only used them to anchor the dimensions (very heavy drawings). So I also use entity names.

 

Some of my parts can also be very different and sometimes it happens that an entity  is called but doesn't exist.

 

The problem is that when it happens when I'm not available to debug it, designers which use my application don't get their drawing which can bring several working hours to draw it by hand.

 

So I'd prefer a drawing with one dimension missing instead of no drawing at all because they are checked by designers. 

the "try catch" method would be usefull because it'd allow me to display a message with the name of the dimension to inform the designer which dimension is missing or has an error.

 

Could you provide a sample of the "try catch" method on a dimension?

I don't know how to use it outside a rule with intent.

 

Thanks

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

Post to forums  

Autodesk Design & Make Report