Message 1 of 2
Sketch Symbol Placement via iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the following code that places a symbol onto drawings, this code is within a larger code that does other things as well. Currently the symbol is placed off of 0,0 but because we use different templates this placement doesn't work for all drawings. Is there a way to detect the bottom right hand corner of the sheet and place the symbol a set distance off of that corner?
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