Automatically Generate Dimensions in VBA

Automatically Generate Dimensions in VBA

Anonymous
Not applicable
948 Views
4 Replies
Message 1 of 5

Automatically Generate Dimensions in VBA

Anonymous
Not applicable

Is it possible in VBA to automatically generate dimensions on a particular view?

 

Some told me that retrieve dimensions tool will be applicable. Did someone has a sample code for retrieve dimensions?

 

PLS HELP!

 

Thank you!

0 Likes
949 Views
4 Replies
Replies (4)
Message 2 of 5

skyngu
Collaborator
Collaborator

Dim oDrawingView As DrawingView

For Each oDrawingView In oDrawingViews

Call oAllDimensions.Retrieve(oDrawingView)

 Next

Autodesk Inventor Professional 2019
0 Likes
Message 3 of 5

Anonymous
Not applicable

.....

Set sideView= osheet.DrawingViews.addBaseView....

 

DIm a as GeneralDimensions

Call a.Retrieve(sideView)

 

 

Above is the snippet of our program.

What is wrong or lacking in our code?

 

Error with this code is(Run-time error '91';  Object variable or Wtih block variable not set)

 

Please help.....thank you!

0 Likes
Message 4 of 5

skyngu
Collaborator
Collaborator

you have not set "a"

 

check vba help and object browser.

Autodesk Inventor Professional 2019
0 Likes
Message 5 of 5

Anonymous
Not applicable

Can help us how to set "a"?

 

We're just starting using VBA. We still have difficulties regarding to objects.

 

Thanks in advance.

0 Likes