.NET

Reply
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 1 of 3 (255 Views)
Accepted Solution

Assign colors to dimension lines, arrowheads, and text

255 Views, 2 Replies
07-22-2013 03:13 PM

Hi All,

 

I just created a dimension style called "Test" and I am now attempting to use its DIMCLRD and DIMCLRT properties without success.

 

DIMCLRD is supposed to assign a color to dimension lines and arrowheads. Does anyone know how to use this property to assign, say, color index 140?

 

AS well, DIMCLRT is supposed to assign a color to dimension text. Any ideas on how it is used?

 

A code snippet on what I am attempting to accomplish is posted below:

 

 

Dim tblRec As DimStyleTableRecord = New DimStyleTableRecord()

tblRec.Name = "Test"

tblRec.Dimasz = 0.08    ' Sets the arrowhead size

tblRec.Dimclrd = ???     ' Here is where I am attempting to assign a color to dimension lines on this dimstyle

tblRec.Dimclrd = ???     ' Here is where I am attempting to assign a color to dimension text on this dimstyle

 

 

Any ideas?

 

Many thanks in advance.

 

 

Cat

Thanks Hallex... Worked like a charm! 

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 3 (232 Views)

Re: Assign colors to dimension lines, arrowheads, and text

07-22-2013 10:42 PM in reply to: mindofcat
Try this:
tblrRec.Dimclrt = Colors.Color.FromColorIndex(Colors.ColorMethod.ByAci, 140)
tblrRec.Dimclrd = Colors.Color.FromColorIndex(Colors.ColorMethod.ByAci, 140)
_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 3 of 3 (218 Views)

Re: Assign colors to dimension lines, arrowheads, and text

07-23-2013 08:39 AM in reply to: Hallex

Thanks Hallex... Worked like a charm! 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!