Message 1 of 16
Model Custom Property to SketchSymbol definition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
G'day.
How would i insert the "variable name" of a custom iProp to a sketched symbol definition (in an idw)?
I can plonk the value of the iProp in no worries, but to make it "live" is a bit beyond me...
Sub WeldNote() On Error Resume Next Dim oDoc As DrawingDocument Dim SketchedSym As SketchedSymbolDefinition Dim oNoteDef As SketchedSymbolDefinition Dim oDefSketch As Sketch Dim oTextbox As TextBox Dim SNewText As String Dim sNoteText As String Dim oReffedDoc As Document Dim lReffedWeldType As Long 'Err.Clear If ThisApplication.ActiveDocumentType = kDrawingDocumentObject Then Set oDoc = ThisApplication.ActiveDocument Set oReffedDoc = oDoc.ReferencedDocuments(1) lReffedWeldType = oReffedDoc.PropertySets.Item("User Defined Properties").Item("WeldType").PropId If lReffedWeldType <> 0 Then 'Obviously this line below is the problem. This is only putting in the value, not a call to the parameter. SNewText = "NOTES:" & Chr(10) & " 1. ALL DIMENSIONS ARE IN MILLIMETRES." & Chr(10) & _ " 2. ALL SHARP EDGES TO BE GROUND" & Chr(10) & " SMOOTH AND FREE OF BURRS." & _ Chr(10) & " 3. ALL WELDS " & oReffedDoc.PropertySets.Item("User Defined Properties").Item("WeldType").Expression & " UNO" Set oNoteDef = oDoc.SketchedSymbolDefinitions.Item("HC Standard Note MM") If oNoteDef.Name <> "" Then oNoteDef.Edit oDefSketch Set oTextbox = oDefSketch.TextBoxes(1) oTextbox.Width = 10 oTextbox.Text = SNewText ' sNoteText oNoteDef.ExitEdit True Set oTextbox = Nothing End If End If Set oNoteDef = Nothing Set oDoc = Nothing End If End Sub
=============================================
This is my signature, not part of my post.
This is my signature, not part of my post.