check/uncheck override text model box

check/uncheck override text model box

Anonymous
Not applicable
851 Views
7 Replies
Message 1 of 8

check/uncheck override text model box

Anonymous
Not applicable
HI! Sorry for my english. How I can check/uncheck the override text model check box in tolerance dialog (for a dimension in a .idw document), in a DLL add in. Is possible, or inventor api not include this possibility. Help me. Thanks.
0 Likes
852 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Unfortunately, the API currently does not support this. This will be
addressed in a future release.

Sanjay-

wrote in message news:[email protected]...
HI! Sorry for my english. How I can check/uncheck the override text model
check box in tolerance dialog (for a dimension in a .idw document), in a DLL
add in. Is possible, or inventor api not include this possibility. Help me.
Thanks.
0 Likes
Message 3 of 8

Anonymous
Not applicable
...lot of thanks, Sanjay! I began to become crazy!
0 Likes
Message 4 of 8

Ktelang
Collaborator
Collaborator

I was wondering whether

this functionality is added to 2012

 

 

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes
Message 5 of 8

Curtis_W
Consultant
Consultant

Hi Ktelang,

 

This was added at some point.

You can find an example using ilogic to look at these properties here:

http://inventortrenches.blogspot.com/2011/06/using-ilogic-to-find-dimension.html

 

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 8

Ktelang
Collaborator
Collaborator

Thanks Curtis,

 

Actually I am trying to override a modelvalue

by scalefactor 3

 

Say modelvalue is 39" I want override display value as

the result of 39*3 =117"

 

Please can you take a look at the code below, I am stuck

at the oLenDim.OverrideModelvalue= Modval

 

It is not dispalying the correct override value in "

I know that inventor default value is in cm I have converted

it to inches.

 

Thanks in advance..

 

==================================================================

 

 

' Check whether the Drawing document is active document.
If ThisApplication.ActiveDocumentType <> kDrawingDocumentObject Then
MsgBox ("Please have the Drawing document open")
Exit Sub
End If

Dim OrDoc As DrawingDocument, OrDocSheet As Sheet
Set OrDoc = ThisApplication.ActiveDocument
Set OrDocSheet = OrDoc.Sheets("Sheet:1")

 

Dim oLenDim As GeneralDimension, oDLODim As GeneralDimension
Set oLenDim = OrDocSheet.DrawingDimensions.GeneralDimensions.Item(1)

 

'Add some formatted text to all dimensions on the sheet.

oLenDim.HideValue = False

 

Dim ModVal As Double, DimScale As Double
DimScale = 3
ModVal = oLenDim.ModelValue
ModVal = ModVal / 2.54
ModVal = ModVal * 3
'Debug.Print ModVal
oLenDim.OverrideModelValue = ModVal

=======================================================================

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes
Message 7 of 8

Ktelang
Collaborator
Collaborator

I see the problem in the last 2 steps in the code

 

Till  ModVal = ModVal * 3
'Debug.Print ModVal

The ModVal = correct as expected 

 

But during

oLenDim.OverrideModelValue = ModVal 

The multiplier #3 is some what treated and converted to inches

so we end up getting the product of ModVal in inches x 3 in inches

(i.e. something around 1.1811)

 

Does Anyone know a way by which I can define a unitless constant

 

Might be basic but have not done this thing before

Thanks a lot

 

 

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes
Message 8 of 8

Ktelang
Collaborator
Collaborator

Nevermind I figured out

 

Sub Overridevalue()
' Check whether the Drawing document is active document.
If ThisApplication.ActiveDocumentType <> kDrawingDocumentObject Then
MsgBox ("Please have the Drawing document open")
Exit Sub
End If

Dim OrDoc As DrawingDocument, OrDocSheet As Sheet
Set OrDoc = ThisApplication.ActiveDocument
Set OrDocSheet = OrDoc.Sheets("Sheet:1")

Dim oLenDim As GeneralDimension, oDLODim As GeneralDimension
Set oLenDim = OrDocSheet.DrawingDimensions.GeneralDimensions.Item(1)

 'Add some formatted text to all dimensions on the sheet.

oLenDim.HideValue = False

Dim ModVal As Double, DimScale As Integer
DimScale = 3
ModVal = oLenDim.ModelValue
ModVal = ModVal * 3
oLenDim.OverrideModelValue = ModVal

End Sub

 

Sharing for others..

------------------------------------------------------------------------------
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
-----------------------------------------------------------------------------
0 Likes