.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Assign colors to dimension lines, arrowheads, and text

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
mindofcat
682 Views, 2 Replies

Assign colors to dimension lines, arrowheads, and text

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

2 REPLIES 2
Message 2 of 3
Hallex
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
Message 3 of 3
mindofcat
in reply to: Hallex

Thanks Hallex... Worked like a charm! 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost