Autodesk Inventor Customization
- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Creating Intelligen t sketched symbols
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Folks, I got another question for you all.
I am currently working on creating new symbols. Now I want to keep the look of the symbol (see attached) but I want all the text to be automated as the text is currently "prompted entry".
Now when I go into the edit the text within the symbol sketch, I need the "view label properties" from the drop down menu but its not there!?!?! Is there a way that I can get the "view label properties" into the drop down menu??? What I am after is to attach this symbol to a view and the symbol will automatically show the name of the view and the scale.
OR........ If there is any way that I can get default view label to look like my symbol???? This would probably be the better idea but Im pretty sure you cannot edit the look of the view label symbol.......... but hopefully Im wrong with this???
Thanks again folks
Dunc1n
Re: Creating Intelligen t sketched symbols
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Do you know to make your symbol now? I want to make the similar symbole with scale view in?
Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi sergelachance,
Here is what I've come up with based on jdkriek's great example at this thread:
The rule first looks for existing view label symbols and removes them, then replaces them on all of the sheets. This rule could use some refinement, so if you improve upon it please post back some examples.
Also, I've attached an example drawing file that you can use to see how this is set up.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheets As Sheets
oSheets = oDoc.Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oSymbol As SketchedSymbol
Dim oSymbols As SketchedSymbols
'iterate through all of the sheets
For Each oSheet In oSheets
'remove existing sketched symbols named View Label
For Each oSymbol In oSheet.SketchedSymbols
If oSymbol.Definition.Name = "View_Label" Then
oSymbol.Delete
Else
End if
Next
'set sheet active
oSheet.Activate
'set a refernce to the drawing views collection
oViews = oDoc.ActiveSheet.DrawingViews
' Iterate through all of the views
For Each oView In oViews
'This places a sketched symbol with the name "View_Label"
Dim oSymDef As SketchedSymbolDefinition
'defind the sketch symbol to be inserted
oSymDef = oDoc.SketchedSymbolDefinitions.Item("View_Label")
'set a string array with values for the prompted entries found in the symbol
Dim sPromptStrings(1) As String
sPromptStrings(0) = "SCALE " & oView.Scale 'set to view scale
sPromptStrings(1) = oView.Name 'set to view name
'set the position for the sketched symbol to be inserted
' and spaced off of the selected view center
Dim oPosition As Point2d: oPosition = oView.Center
oPosition.y = oPosition.y - (oView.Height / 2 + 0.6)
'insert the sketched symbol and set the prompted entries
oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
Next
Next
'activate sheet1
oDoc.Sheets.Item(1).Activate

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks Curtis you are the king ![]()
Curtis_Waguespack wrote:Hi sergelachance,
Here is what I've come up with based on jdkriek's great example at this thread:
The rule first looks for existing view label symbols and removes them, then replaces them on all of the sheets. This rule could use some refinement, so if you improve upon it please post back some examples.
Also, I've attached an example drawing file that you can use to see how this is set up.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheets As Sheets
oSheets = oDoc.Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim oSymbol As SketchedSymbol
Dim oSymbols As SketchedSymbols
'iterate through all of the sheets
For Each oSheet In oSheets
'remove existing sketched symbols named View Label
For Each oSymbol In oSheet.SketchedSymbols
If oSymbol.Definition.Name = "View_Label" Then
oSymbol.Delete
Else
End if
Next
'set sheet active
oSheet.Activate
'set a refernce to the drawing views collection
oViews = oDoc.ActiveSheet.DrawingViews
' Iterate through all of the views
For Each oView In oViews
'This places a sketched symbol with the name "View_Label"
Dim oSymDef As SketchedSymbolDefinition
'defind the sketch symbol to be inserted
oSymDef = oDoc.SketchedSymbolDefinitions.Item("View_Label")
'set a string array with values for the prompted entries found in the symbol
Dim sPromptStrings(1) As String
sPromptStrings(0) = "SCALE " & oView.Scale 'set to view scale
sPromptStrings(1) = oView.Name 'set to view name
'set the position for the sketched symbol to be inserted
' and spaced off of the selected view center
Dim oPosition As Point2d: oPosition = oView.Center
oPosition.y = oPosition.y - (oView.Height / 2 + 0.6)
'insert the sketched symbol and set the prompted entries
oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition,0,1,sPromptStrings)
Next
Next
'activate sheet1
oDoc.Sheets.Item(1).Activate
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
AND IF I WANT MY SCALE IN INCHES
DO YOU HAVE A SOLUTION AGAIN ![]()
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
i dont want to insert and delete automaticaly the sketched symbol, because too many style in each sheet, i just want to update de oview name et oview scale of each symbols in each sheets and it's possible to put the scale in feets? ex.:1/4"=1'-0"
Thanks for any help
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I may not understand your question correctly. It looks you want to update the value of the prompt string (in inch) in a sketched symbol. If yes, I think you could just convert the scale to inch by UnitsOfMeasure.GetPreciseStringFromValue and set the argument. e.g. on the basis of the code above provied by Curtis.
'set to view scale
sPromptStrings(0) = "SCALE " & UnitsOfMeasure.GetPreciseStringFromValue(oView.Scale,kInchLengthUnits)
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks for your reply xiaodong but dont work ![]()
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Could you elaborate what is your exact problem? any code and snapshot?
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Ilogic drawing view label scale and name
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
IT'S NECESSARY TO DELETE AND REPLACE ALL SKETCHED SYMBOILS?
FIRST PIC = BEFORE CAPTURE SCREEN!
SECOND PIC = BEFORE RULE
THIRD PIC = WITH YOUR RULE AND MY ERROR CODE
THANKS AGAIN FOR YOUR HELP ![]()



