Message 1 of 7
How to place stamp/symbol automatically at bottom righthand corner of drawing border?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a symbol/stamp that is being inserted onto drawings when releasing them. The stamp gets placed on the right hand border of the drawing but this only works for a certain drawing template since it is using a 0,0 insertion point (which is the bottom left hand corner of the drawing sheet. To allow this to work with different drawing templates/sizes I need the code to be able to detect the bottom right hand corner of the drawing sheet automatically and use that point as the insertion point for the stamp, is that possible? Below is the portion of my code how it is currently working.
Option Explicit On Imports System.IO
Sub Main Call PlaceStamp() Call CreatePDF() 'Call Printing() Call Email() Call DeleteStamp() End Sub Sub PlaceStamp ' reference to the sketched symbol definition. Dim oSymbolDef As SketchedSymbolDefinition oSymbolDef = ThisDrawing.Document.SketchedSymbolDefinitions.Item("Drawing Release Stamp") Dim oSheet As Sheet = ThisDrawing.Document.ActiveSheet 'create insertion point, coordinates - in cm ! Dim oTG As TransientGeometry = ThisApplication.TransientGeometry Dim oPoint As Point2d = oTG.CreatePoint2d(0, 0) ' Add an instance of the sketched symbol definition to the sheet. ' Rotate angle = 0 radians, scale = 1 when adding Dim sPromptStrings(4) As String 'Get prompt values, this example just uses hardcoded values sPromptStrings(0) = InputBox("Enter Signature", "iLogic", "") sPromptStrings(1) = InputBox("Enter Date", "iLogic", "") sPromptStrings(2) = InputBox("Enter Job #", "iLogic", "") sPromptStrings(3) = InputBox("Enter Rev", "iLogic", "") sPromptStrings(4) = InputBox("If this is a revised drawing, type 'REVISED DRAWING'", "iLogic", "") Dim oSymbol As SketchedSymbol oSymbol = oSheet.SketchedSymbols.Add(oSymbolDef, oPoint, 0, 1, sPromptStrings) End Sub Sub DeleteStamp