- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I was wondering if someone could help me design an iLogic program. I would like to use small equilateral triangles (approx. 0.156" tall) with two to three letters of text (size 0.06) inside the triangle. I'll be using this symbol to designate certain features. A feature will be labeled with either the letter "S" or "F" followed by a number (1,2,3...and so fourth). I would like a prompt to ask the user how many features they need to label and then have the program loop through and create a symbol with the correct letter and appropriate number, pasting each symbol in a line down the side of the page so that the user can click and drag each symbol to the desired location.
If anyone knows of a way to do this, or could steer me in the right direction, it would be much appreciated!
Thanks!
-Nick
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
This code does what you need, there may be slight modifications needed, but if you create a sketched symbol called "Triangle Walks"
with 2 promted entries (first is Letter, second is Number) the code will insert the symbol on the left of your drawing
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
Dim oTriangleWalksDef As SketchedSymbolDefinition
oTriangleWalksDef = oDrawDoc.SketchedSymbolDefinitions.Item("Triangle Walks")
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim dblStartPointX, dblStartPointY As Double
dblStartPointX = 1.5
dblStartPointY = oSheet.Height - 1.5
Dim strLetter As String
strLetter = InputBox("Provide Letter.", "Letter", , 400, 400)
Dim iNumber As Integer
iNumber = InputBox("Provide Number.", "Number", , 400, 400)
For iNumber = 1 To iNumber
Dim sPromptStrings(1) As String
sPromptStrings(0) = strLetter
sPromptStrings(1) = iNumber
Dim oSketchedSymbol As SketchedSymbol
oSketchedSymbol = oSheet.SketchedSymbols.Add(oTriangleWalksDef, oTG.CreatePoint2d(dblStartPointX, dblStartPointY), 0, 1, sPromptStrings)
oSketchedSymbol.Static = True
dblStartPointY = dblStartPointY - 1
Next iNumber
please feel free to "kudos"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
-Nick