Document Settings

Document Settings

dbrblg
Collaborator Collaborator
1,089 Views
5 Replies
Message 1 of 6

Document Settings

dbrblg
Collaborator
Collaborator

Does anyone know where I can change the 'Default Parameter Input Display' setting under the Units tab of the Document Settings?  I would like to know the route through the API to programatically change this setting.  

 

I have tried

PartDocument>ComponentDefinitions>Parameters &

PartDocument>UnitsOfMeasure

 

to no avail....!!

 

Thanks

0 Likes
1,090 Views
5 Replies
Replies (5)
Message 2 of 6

dean.morrison
Advocate
Advocate

This one I had to ask autodesk through my support!!

                    
Dim oBOMQty As BOMQuantity
Set oBOMQty = oCompDef.BOMQuantity

 

oBOMQty.SetBaseQuantity kParameterBOMQuantity, oParam    'This one sets it to mm (need to define oParam!)


oBOMQty.SetBaseQuantity kEachBOMQuantity                            'This one sets it to each

 

Hope this is what you are after.

 

Dean.

0 Likes
Message 3 of 6

dbrblg
Collaborator
Collaborator

Thanks very much for asking it is much appreciated, however the parameter I was after is shown more clearly in the attached picture, I hope Smiley Happy

 

Many thanks

0 Likes
Message 4 of 6

dean.morrison
Advocate
Advocate

I meant i asked this of my support a while ago....

 

Anyways i must have been half asleep this morning, as i didnt read your post correctly!

 

I am not sure where you find that one via API.

 

To be honest i had not even noticed that setting at ALL!!

 

hopefully someone else can answer.

 

Sorry about that!

 

Dean

0 Likes
Message 5 of 6

Curtis_Waguespack
Consultant
Consultant

Hi dbrblg, 

 

I know this is an old post, but I just ran across it and thought that I'd add this in case you're still interested and for anyone who might find this in the future.

 

Dim oDoc As Inventor.PartDocument
oDoc = ThisApplication.ActiveDocument

Dim oParams As Parameters
oParams = oDoc.ComponentDefinition.Parameters

Dim oModelParams As ModelParameters
 oModelParams = oParams.ModelParameters
  
If oParams.DisplayParameterAsExpression = True  then
oParams.DisplayParameterAsExpression = False

Else if DisplayParameterAsExpression = False Then
oParams.DisplayParameterAsExpression = True
end if

 

This link might also be of interest:

http://forums.autodesk.com/t5/Autodesk-Inventor/iLogic-show-equation-instead-of-value/td-p/3294589

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

EESignature

0 Likes
Message 6 of 6

dbrblg
Collaborator
Collaborator

Hi Curtis, 

 

Thanks for the update.  The original project I was working on was canned but I am certain this will be useful in the future.

 

Thanks for remembering this Smiley Happy

0 Likes