Inventor Customization

Reply
Contributor
vampelas
Posts: 22
Registered: ‎07-09-2010
Message 1 of 4 (621 Views)

Change Drawing Dimension Text and Symbols Font with iLogic

621 Views, 3 Replies
11-02-2012 09:09 AM

Hi,

 

I was looking to change the fonts in a drawing for the Dimensions and Symbols that might have been inserted in the Dimension text entries.

 

This can be done manually bu editing the dimentions text after placemement, but I was ooking to set this as a default.. I cannot see where exactly this is controlled in the Styles Manager - I am only able to change the Dimension text font but the diameter symbol font is always on AIGDT.

 

I was therefore looking for an iLogic\vb code that could do the trick, but I am not able to even change the dimension fonts... The code runs with no errors but nothing gets updated in the drawing...

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument


Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet


Dim oBaseDimSet As BaselineDimensionSet
Dim oBaseDimSets As BaselineDimensionSets
For Each oBaseDimSets In oSheet.DrawingDimensions.BaselineDimensionSets
    oBaseDimSet.Style.TextStyle.Font = "Chiller"
    oBaseDimSet.Style.TextStyle.FontSize = 10
Next


InventorVb.DocumentUpdate()

 

Any idea what I am doing wrong here?

 

Best Regards,

Vas

*Expert Elite*
jdkriek
Posts: 528
Registered: ‎03-29-2007
Message 2 of 4 (598 Views)

Re: Change Drawing Dimension Text and Symbols Font with iLogic

11-05-2012 05:50 AM in reply to: vampelas

Here you go

 

Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet

Dim oBaseDimSet As BaselineDimensionSet
Dim oBaseDimSets As BaselineDimensionSets
oBaseDimSets = oSheet.DrawingDimensions.BaselineDimensionSets
    For Each oBaseDimSet In oBaseDimSets
        oBaseDimSet.Style.TextStyle.Font = "Chiller"
        '.396 = .156in Text
        '.458 = .180in Text
        oBaseDimSet.Style.TextStyle.FontSize = 0.458
    Next
Jonathan D. Kriek

Autodesk Inventor Certified Expert
Microsoft Certified Application Developer
_____________________________________________________
Did I help you? Please choose Accept as Solution or Kudos below
Contributor
vampelas
Posts: 22
Registered: ‎07-09-2010
Message 3 of 4 (589 Views)

Re: Change Drawing Dimension Text and Symbols Font with iLogic

11-05-2012 09:29 AM in reply to: jdkriek

Hi Joh,

 

Thank for the response and assitance, I knew I was forgetting something importnat in that code... Although this code still make no effect on the drawing for some reason, does that work for you on existing dimension text?

 

Many thanks,

Vas

ADN Support Specialist
xiaodong.liang
Posts: 1,263
Registered: ‎06-12-2011
Message 4 of 4 (556 Views)

Re: Change Drawing Dimension Text and Symbols Font with iLogic

11-19-2012 10:40 PM in reply to: vampelas



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube