drawing views...

drawing views...

bibleje
Advocate Advocate
1,077 Views
8 Replies
Message 1 of 9

drawing views...

bibleje
Advocate
Advocate

Lets say I have 2 different parts but they have very common features on one end of them.  I would like to place them both on the same drawing sheet but would like to align one of the common features such as the end of each one of them.  Is this possible?  I'm including an example. 

 

Thank you,

 

John E. Bible

IV 2016

0 Likes
Accepted solutions (1)
1,078 Views
8 Replies
Replies (8)
Message 2 of 9

Cadmanto
Mentor
Mentor

Have you tried RCing on the view and selecting the following.

View.jpg

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

 

 

New EE Logo.PNG

Inventor.PNG     vault.PNG

Best Regards,
Scott McFadden
(Colossians 3:23-25)


0 Likes
Message 3 of 9

salariua
Mentor
Mentor

    


Cadmanto wrote:

Have you tried RCing on the view and selecting the following.


 

I have and it doesn't work. I have even created them as equal lengths just so I can align them first but alignment of the views seems to be done by view center point.

 

thought it's by origin so I shifted my parts over to get them on same origin and it still didn't work.

 

Whan you can do @bibleje is place and constrain the parts in an assembly and create a drawing view of that.

 

 

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 4 of 9

salariua
Mentor
Mentor

I suppose you can place the views precisely using iLogic ...

 

Here is a post by Luke Davenport.

 

https://www.cadlinecommunity.co.uk/hc/en-us/articles/202280491-Inventor-2015-iLogic-Accurately-Posit...

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 5 of 9

bibleje
Advocate
Advocate
Accepted solution

I am certainly not an iLogic guy so I wont even attempt to try.  honestly its simply not worth the effort for as many times I'll need to align views so I'll accept the solution and move on.

 

Thank you for your help,

 

John E. Bible

0 Likes
Message 6 of 9

Cadmanto
Mentor
Mentor

What was the solution for you?

 

check.PNGIf this solved your issue please mark this posting "Accept as Solution".

Or if you like something that was said and it was helpful, Kudoskudos.PNG are appreciated. Thanks!!!! Smiley Very Happy

 

New EE Logo.PNG

Inventor.PNG     vault.PNG

Best Regards,
Scott McFadden
(Colossians 3:23-25)


0 Likes
Message 7 of 9

bibleje
Advocate
Advocate

I'll simply take it over to AutoCAD and send out a .pdf in the future Scott.  I assume the iLogic would work but I am not going to go to that effort at this time.  Please email me direct at john@aepmetal.

 

Thank you,

 

John E. Bible

 

0 Likes
Message 8 of 9

salariua
Mentor
Mentor

@bibleje

 

You are a hard man to please and I have way too much free time on my hands.

 

The next code will get the X position of the first view and align the rest according to it. Views on drawing are positioned by Center so you need to get the Width of the view and divide it by 2 but it’s all in the code.

 

You need to take care of the vertical Y position of the view and the code will align on X.

 

170714 Align Drawing  Views.gif

 

Now you have to agree I have a working solution here.

 

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oView As DrawingView

Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet


' Process the rule, wrapping it in a transaction so the 
' entire process can be undone with a single undo operation. 
Dim trans As Transaction 
trans = ThisApplication.TransactionManager.StartTransaction( _ 
        oDrawDoc, "Alig Views")
		
		oFirstView = oSheet.DrawingViews.Item(1)
		
		'views are processed by center so we need to get center X and substract half view
		Dim XPos As Double
		XPos = oFirstView.Position.X - (oFirstView.Width/2)
		
		Dim oPoint2D As Inventor.Point2D
		
		'view position is XPos + half of each view
		For Each oView In oSheet.DrawingViews
			oPoint2D = ThisApplication.TransientGeometry.CreatePoint2D(XPos + (oView.Width/2),oView.Position.Y)
			oView.Position = oPoint2D
		Next
		
'finish the transaction
trans.End 

Test this solution out please.

 

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!
0 Likes
Message 9 of 9

salariua
Mentor
Mentor

Hi @bibleje

 

have you tried my code? how was it?

 

@rhasell has a different code on his blog to handle views in a pair. you select them and it will align them... a bit more complicated than I make it sound 🙂

 

Have you tested this solution out?

 

Here is his post

 

 

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!
0 Likes