Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ilogic, drawing dimension alignment for particular view in drawing

2 REPLIES 2
Reply
Message 1 of 3
Prasad.pet
1092 Views, 2 Replies

ilogic, drawing dimension alignment for particular view in drawing

Hi Everybody

 

I got the help of Autodesk Developer Phillipe in Aligning the dimension through i-logic code.

It works fantastic generally for all the view in drawing

But Is it possible to use the code for a particular view in a drawing?

 

Could anyone can give me solution. Following is the code written in VB.Net

 

        Dim doc As Inventor.DrawingDocument
        doc = inventorApp.ActiveDocument

        Dim ActiveSheet As Inventor.Sheet
        ActiveSheet = doc.ActiveSheet

        Dim dimensions As Inventor.ObjectCollection
        dimensions = inventorApp.TransientObjects.CreateObjectCollection

        Dim drawDim As Inventor.DrawingDimension
        For Each drawDim In ActiveSheet.DrawingDimensions

            If Not TypeOf drawDim Is Inventor.OrdinateDimensionSet _
            And Not TypeOf drawDim Is Inventor.BaselineDimensionSet _
            And Not TypeOf drawDim Is Inventor.ChainDimensionSet Then
                Call dimensions.Add(drawDim)
            End If
        Next

        Call ActiveSheet.DrawingDimensions.Arrange(dimensions)

 

 

2 REPLIES 2
Message 2 of 3
salariua
in reply to: Prasad.pet

wrong thread...

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
Message 3 of 3
RodrigoEiras
in reply to: Prasad.pet

 

Hi Prasad,

 

This is a good one. As the dimensions in a drawing are defined at sheet level and not at view level, you may not find any element to differenciate which ones belong to a specific view.

The only way I can think of is using attributes to "mark" those dimensions belonging to a view. Then you could only add those ones to the ObjectCollection to be arranged.

 

In order to get familiar with attributes and also to get the very useful Attribute Helper Add-in developped by Brian Etkins, the place to start is here:

 

http://modthemachine.typepad.com/my_weblog/2009/07/introduction-to-attributes.html

 

It might be a little confusing at the beggining (it as for me), but it is a very useful method to mark elements in a drawing (also in parts and assemblies) and then retrieve them using the Attribute Manager. It is worth investing some time in it.

 

I hope this may help you.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report