Document settings

Document settings

GosponZ
Collaborator Collaborator
1,300 Views
8 Replies
Message 1 of 9

Document settings

GosponZ
Collaborator
Collaborator

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/...

0 Likes
Accepted solutions (1)
1,301 Views
8 Replies
Replies (8)
Message 2 of 9

Vladimir.Ananyev
Alumni
Alumni

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

0 Likes
Message 3 of 9

GosponZ
Collaborator
Collaborator

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

0 Likes
Message 4 of 9

Vladimir.Ananyev
Alumni
Alumni
Accepted solution

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
Collaborator
Collaborator

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

 

0 Likes
Message 6 of 9

Vladimir.Ananyev
Alumni
Alumni

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

0 Likes
Message 7 of 9

GosponZ
Collaborator
Collaborator

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 

0 Likes
Message 8 of 9

GosponZ
Collaborator
Collaborator

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.

0 Likes
Message 9 of 9

Vladimir.Ananyev
Alumni
Alumni

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

0 Likes