Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

help! my code has stopped working

1 REPLY 1
Reply
Message 1 of 2
swordmaster
204 Views, 1 Reply

help! my code has stopped working

Guys I need some help

I wrote a ilogic rule that extracts some information from the referenced document in a drawing.

It has been working great until today! This is the part of the code that is complaining

 

 

' iterate through referenced documents, in reality there is only one

 

For Each

oRefDoc In oDrawingDoc.AllReferencedDocuments

oPropsets = oRefDoc.PropertySets

oParameters =oRefDoc.ComponentDefinition.Parameters

oUserParams =oRefDoc.ComponentDefinition.Parameters.UserParameters

next

 

I think I know what the problem is but need some help to fix this.

Sometimes i have a part to which i have 1 or 2 parts linked. In this case the code throws me out.

I think this is because Inventor is seeing these linked parts as being referenced documents. So it getting confused.

Anyone help me out to change this so the code ignores the linked files

 

Inventor 2010 Certified Professional
1 REPLY 1
Message 2 of 2
YuhanZhang
in reply to: swordmaster

If you don't like to access the indirectly referenced documents by the drawing document you can use the ReferencedDocument instead of the AllReferencedDocuments. Hope this helps.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report