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
Solved! Go to Solution.
Solved by bibleje. Go to Solution.
Have you tried RCing on the view and selecting the following.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
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.
I suppose you can place the views precisely using iLogic ...
Here is a post by Luke Davenport.
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
What was the solution for you?
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
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
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.
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.
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
Can't find what you're looking for? Ask the community or share your knowledge.