Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hello,
I'm currently working on Excel macro that connects to current session (drawing) and extracts data.
I managed to get it so far that it extracts dimensions (names and value) but i just can't get a correct procedure to get the dimensions upper and lower tolerance.
The only thing i was able to obtain is tolerance type with ipfcdimension2D.GetTolerance().
Is there a method to get upper and lower tolerance somehow?
Greatly appreciate the answer!
Klemen
Solved! Go to Solution.
Just after 10 hours of search and after typing this post I realised what to do.
For anyone else searching for this, the solution is:
What i had:
Dim model as ipfcdrawing
set model = session.currentmodel
Dim dimowner as ipfcmodelitemowner
set dimowner = model
dim dimensions as ipfcmodelitems
set dimensions = dimowner.listitems(epfcmodelitemtype.epfcITEM_DIMENSION)
dim dimension as ipfcdimension2D
set dimension = dimensions.item(i)
dim tolerance as ipfcdimtolerance <------------- Here was the problem as having it defined like this only gives you option "type"
set tolerance = dimension(i).gettolerance
What now gives me what i needed:
Dim model as ipfcdrawing
set model = session.currentmodel
Dim dimowner as ipfcmodelitemowner
set dimowner = model
dim dimensions as ipfcmodelitems
set dimensions = dimowner.listitems(epfcmodelitemtype.epfcITEM_DIMENSION)
dim dimension as ipfcdimension2D
set dimension = dimensions.item(i)
dim tolerance as ipfcdimtolplusminus <------------- Having it set like this now gives us options Minus and Plus
set tolerance = dimension(i).gettolerance
Just after 10 hours of search and after typing this post I realised what to do.
For anyone else searching for this, the solution is:
What i had:
Dim model as ipfcdrawing
set model = session.currentmodel
Dim dimowner as ipfcmodelitemowner
set dimowner = model
dim dimensions as ipfcmodelitems
set dimensions = dimowner.listitems(epfcmodelitemtype.epfcITEM_DIMENSION)
dim dimension as ipfcdimension2D
set dimension = dimensions.item(i)
dim tolerance as ipfcdimtolerance <------------- Here was the problem as having it defined like this only gives you option "type"
set tolerance = dimension(i).gettolerance
What now gives me what i needed:
Dim model as ipfcdrawing
set model = session.currentmodel
Dim dimowner as ipfcmodelitemowner
set dimowner = model
dim dimensions as ipfcmodelitems
set dimensions = dimowner.listitems(epfcmodelitemtype.epfcITEM_DIMENSION)
dim dimension as ipfcdimension2D
set dimension = dimensions.item(i)
dim tolerance as ipfcdimtolplusminus <------------- Having it set like this now gives us options Minus and Plus
set tolerance = dimension(i).gettolerance