Titelblock - symbols

Titelblock - symbols

Anonymous
Not applicable
763 Views
11 Replies
Message 1 of 12

Titelblock - symbols

Anonymous
Not applicable

I am creating a new idw template.

 

I need to show a small table at the upper right hand side of the template...

when cycling through different sheet sizes.. A1, A2 etc.. then the table/symbol should move accordingly so that it is in the upper right hand side..

 

has anyone done anything like this using ilogic?

 

 

0 Likes
Accepted solutions (2)
764 Views
11 Replies
Replies (11)
Message 2 of 12

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi lynlaysaymo,

 

 

Here is a quick example, as well as an attached 2017 file. In the attached file, the code handles the offset for a border as well.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet

For Each oSymbol As SketchedSymbol In oSheet.SketchedSymbols
	If oSymbol.Name = "My Table" Then
		Dim oPoint As Point2d = oSymbol.Position
		oPoint.X = oSheet.Width 
		oPoint.Y = oSheet.Height 
		oSymbol.Position = oPoint
	End If
Next

EESignature

Message 3 of 12

salariua
Mentor
Mentor

@Anonymous If it's a table (not a symbol) then you need to calculate table width, length. 

 

I have just been playing with this and tables are attached from the top left corner from what I can see (or at least revision table is). 

 

Nonetheless, the Maestro is on the case and gave you nice and clean answer.

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 12

Anonymous
Not applicable

this works great; thanks!

 

 I simply changed

oPoint.X = oSheet.Width - 3.234 

oPoint.Y = oSheet.Height - 2.3242

 

etc... 

 

now :)... how about for placing something on the upper right hand side of the drawing... ? same applies if the sheet size changes then  I need to the symbol to move accordingly.

 

thanks all...

 

0 Likes
Message 5 of 12

Anonymous
Not applicable

sorry... not the upper right but the upper left now... apologies for the confusion

0 Likes
Message 6 of 12

salariua
Mentor
Mentor
Accepted solution

I don't see a way of getting symbol size and the values might be different for you

 

Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet

For Each oSymbol As SketchedSymbol In oSheet.SketchedSymbols
	If oSymbol.Name = "My Table" Then
		Dim oPoint As Point2d = oSymbol.Position
		oPoint.X = 0 + 3.234 
		oPoint.Y = oSheet.Height - 2.3242
		oSymbol.Position = oPoint
	End If
Next
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 7 of 12

Anonymous
Not applicable

perfect, thank you!!

0 Likes
Message 8 of 12

Mecanico14
Advisor
Advisor

Good afternoon.
Can the A4 format be turned 90 °?
The others interest me in horizontal, but the vertical A4.

An alternative would be to be able to select the presentation between horizontal and vertical, as you can choose when printing, for example.

Excellent work.

(Sorry for my English, I use a translator).

Thank you.


-------------------------
Un saludo.

Mecanico14

Siempre parece imposible hasta que se hace.

0 Likes
Message 9 of 12

salariua
Mentor
Mentor

this works out of the box and it's quite user-friendly?

 

 

 

 

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 10 of 12

Mecanico14
Advisor
Advisor

Thanks for answering.


Yes, I know it can be done outside the box, but I wanted to be able to select it from the box. Or at least the A4 format is positioned vertically, as is normal in the Standard.
It is not a problem to select it from the outside, simply that by creating such a simple way to change the format, it seemed more correct to at least see the A4 vertically.


Thanks again for helping.


(Sorry for my English, I use a translator.)


-------------------------
Un saludo.

Mecanico14

Siempre parece imposible hasta que se hace.

0 Likes
Message 11 of 12

salariua
Mentor
Mentor
Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet

If oSheet.Size = Inventor.DrawingSheetSizeEnum.kA4DrawingSheetSize Then
	
	oSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
Else
	oSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
End If
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 12 of 12

Mecanico14
Advisor
Advisor

Wonderful, awesome, perfect, is what I needed.
In case anyone is interested:
In the example provided by @Curtis_Waguespack, there are three rules of iLogic, I was not sure where to put this code and I added it in the first rule "Move Symbol", thus:

 

'define border offset adjustment value
oBorderWidth = 0.325 * 2.54 '2.54 converts value to inches

Dim oDrawDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = oDrawDoc.ActiveSheet

If oSheet.Size = Inventor.DrawingSheetSizeEnum.kA4DrawingSheetSize Then
	
	oSheet.Orientation = Inventor.PageOrientationTypeEnum.kPortraitPageOrientation
Else
	oSheet.Orientation = Inventor.PageOrientationTypeEnum.kLandscapePageOrientation
End If

For Each oSymbol As SketchedSymbol In oSheet.SketchedSymbols
	If oSymbol.Name = "My Table" Then
		Dim oPoint As Point2d = oSymbol.Position
		oPoint.X = oSheet.Width - oBorderWidth 
		oPoint.Y = oSheet.Height - oBorderWidth 
		oSymbol.Position = oPoint
	End If
Next

 

Thank you very much @salariua

 

(Sorry for my English, I use a translator.)


-------------------------
Un saludo.

Mecanico14

Siempre parece imposible hasta que se hace.

0 Likes