Message 1 of 7

Not applicable
06-22-2016
12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a code that looks for a yes or no iproperty from the idw model and place a sketch symbol in the idw depending on the yes or no.
I am currently using these line of code to get the sketch symbol
SyntaxEditor Code Snippet
'create insertion point, coordinates - are cm Dim oTG As TransientGeometry = ThisApplication.TransientGeometry Dim oInsertionPoint As Point2d 'define the insert point for the symbol oInsertionPoint = oTG.CreatePoint2d(23.9,4.5) ' X = 25 cm , Y = 4.5 cm 'define symbol Definition to use oSymDef= oDrawDoc.SketchedSymbolDefinitions.Item(sSymbol_01) 'capture the current active sheet Dim oCurrentNumber As Sheet oCurrentNumber = oDrawDoc.ActiveSheet 'insert the new symbol 'Nothing is used when teh symbol has no prompted entry oSym = oCurrentNumber.SketchedSymbols.Add(oSymDef,oInsertionPoint,0,1,Nothing)
But it doesn't look for the skecth symbol in the libraries, only in the local one.
Is there a way (ilogic code) to insert a sketch symbol from the library?
I know that there's code to get the sketch symbol from a template but I really wish I could just use the one in the library.
Solved! Go to Solution.