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: 

Document settings

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
GosponZ
837 Views, 8 Replies

Document settings

I'm trying but it is not working for me . No error in rule. Somebody to advice me.

Thank you

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Document-settings-with-rule-Form/td-p/...

8 REPLIES 8
Message 2 of 9
Vladimir.Ananyev
in reply to: GosponZ

I've attached ipt-file with rule and parameters as described by  in this post

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Document-settings-with-rule-Form/td-p/...

If you change user parameter then document Default BOM Structure setting  is changed automatically by iLogic rule.

Works for me.  Could you test it?

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 9
GosponZ
in reply to: Vladimir.Ananyev

I'm on 2012 can't open.Smiley Sad

Message 4 of 9
Vladimir.Ananyev
in reply to: GosponZ

Do the following:

1.  Create text user parameter as shown on the next image

pic0.png

 

2. Create iLogic rule as shown on the next image:

pic1.png

 

 

' Get part component definition
Dim oCompDef As PartComponentDefinition = ThisDoc.Document.ComponentDefinition

' Change BOM Structure based on multi value parameter
' BOM Structure Enumerator values are available in the programming help menu in Inventor.
Select Case BOMStructureParam
  Case "Normal"
    oCompDef.BOMStructure = BOMStructureEnum.kNormalBOMStructure
  Case "Phantom"
    oCompDef.BOMStructure = BOMStructureEnum.kPhantomBOMStructure
  Case "Reference"
    oCompDef.BOMStructure = BOMStructureEnum.kReferenceBOMStructure
  Case "Purchased"
    oCompDef.BOMStructure = BOMStructureEnum.kPurchasedBOMStructure
  Case "Inseparable"
    oCompDef.BOMStructure = BOMStructureEnum.kInseparableBOMStructure
End Select

iLogicVb.UpdateWhenDone = True

 

3. Now if you change  parameter BOMStructureParem value, this rul will be executed automatically and document settings will be changed

 

pic2.png

 

cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 5 of 9
GosponZ
in reply to: GosponZ

Hi Vladimir,

everything i followed you wrote but seems to me something is wrong.I made parameters, made rule. Change parameter and then run rule  but in Document Settings is allways Normal. It never change.

Is it there something else that i'm missing? When i'm runing Rule it seems to me it is Ok.

Please advice.

 

Thank you

 

Message 6 of 9
Vladimir.Ananyev
in reply to: GosponZ

I've attached my part tested in Inventor 2012.  It works properly.

You should change the value of the multi-value user parameter BOMStructureParam, then the iLogic rule executes automatically because it depends on the parameter BOMStructureParam value. 

Result could be seen in Document settings.

 

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 7 of 9
GosponZ
in reply to: GosponZ

Indeed your block is working perfect. I made same as you did and after i change parameter and run rule it still stay same Normal in doc settings.

I even export parameters you did and import them and it wont work but your block is fine.

 

I realy do not know what is going on with my machine.

 Thanks for the help 

Message 8 of 9
GosponZ
in reply to: GosponZ

We in our company try to open your model on couple more other machines and it is working good. When we creating new part and do same procedure it fail. We have Inventor 2012.suite. Is it in professional version better solved?

I know we have several issues with Inventor, with dwg files some views has green corners and need number times to update files to make them dissapear, Couldn't find answer with that one , and biggest problem is making components. Target assembly location - when click on yes to create new target assembly  it will not open any folder or even to get to them, After restart Inventor it seem to be normal, but for just little while. If i open dwg in any reason and going back to make components problem is just repeat again and solution is restart. I think this is probably problem for other topic but just want to mention if there is something in comon to create this problems. It start to be annoying.

Thanks to every one who can help.

Message 9 of 9
Vladimir.Ananyev
in reply to: GosponZ

I have no idea what could be a reason for this strange effect 😞   

It doesn't look like API problem.  Can reinstall help?

I think you should ask advice on Inventor Forum:

http://forums.autodesk.com/t5/Autodesk-Inventor/bd-p/78


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report