Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
twinz3950
Posts: 66
Registered: ‎02-14-2013
Message 1 of 3 (225 Views)
Accepted Solution

Syntax for drawing view alignment

225 Views, 2 Replies
12-24-2013 08:02 AM

I am trying to align two views horizontally  with I logic, (view 1) and (view 2) but I am not sure what the syntax needs to look like.

 

I know that I need to import the Drawing view Alignment Enumeration, but other than that I don't know what to do, can some one post an example of how to align views with I-logic. Thanks.

You will have to access two drawing view objects:  the view you are trying to align and the view you wish to align it with.

 

So, let's say that you have accessed the two drawing view objects and stored them in the following variables:

 

oTargetView (this one stores the view you are trying to align)

oInputView (this is the view you are aligning with)

 

You will also need to choose a DrawingViewAlignmentEnum.  This tells it how you wish to align it, and you have three choices: kHorizontalViewAlignment, kVerticalViewAlignment, and kInPositionViewAlignment.

 

Once you have these three things, your syntax will be as follows:

 

oTargetView.Align(oInputView, DrawingViewAlignmentEnum.kHorizontalViewAlignment)

 

Post back if you have any more questions about this.

 

Cameron Whetten
Inventor 2014

Please click "Accept as Solution" if this response answers your question.

*Expert Elite*
cwhetten
Posts: 1,073
Registered: ‎09-03-2008
Message 2 of 3 (183 Views)

Re: Syntax for drawing view alignment

12-26-2013 09:00 AM in reply to: twinz3950

You will have to access two drawing view objects:  the view you are trying to align and the view you wish to align it with.

 

So, let's say that you have accessed the two drawing view objects and stored them in the following variables:

 

oTargetView (this one stores the view you are trying to align)

oInputView (this is the view you are aligning with)

 

You will also need to choose a DrawingViewAlignmentEnum.  This tells it how you wish to align it, and you have three choices: kHorizontalViewAlignment, kVerticalViewAlignment, and kInPositionViewAlignment.

 

Once you have these three things, your syntax will be as follows:

 

oTargetView.Align(oInputView, DrawingViewAlignmentEnum.kHorizontalViewAlignment)

 

Post back if you have any more questions about this.

 

Cameron Whetten
Inventor 2014

Please click "Accept as Solution" if this response answers your question.

Valued Contributor
twinz3950
Posts: 66
Registered: ‎02-14-2013
Message 3 of 3 (176 Views)

Re: Syntax for drawing view alignment

12-26-2013 12:36 PM in reply to: twinz3950

Thank you for your help.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.