DIESEL Function - Hex2Dec

DIESEL Function - Hex2Dec

Anonymous
Not applicable
303 Views
1 Reply
Message 1 of 2

DIESEL Function - Hex2Dec

Anonymous
Not applicable

I use AuoCAD LT 2015. I annotate equipment placed on DWGS with a 3-string hexadecimal number. I need to perform calculations on those numbers but in decimal format. So my question is - can anyone formulate a DIESEL function to tranform a 3-string hexadecimal number to its corresponding integer. Any help would be greatly appreciated.

0 Likes
304 Views
1 Reply
Reply (1)
Message 2 of 2

vladimir_michl
Advisor
Advisor

You might be able to parse the string and convert it with a series of complicated DIESEL expressions - like:

 

$(substr,MYHEX,1,1)

$(i>,X1,9)

$(*,X1,16)

 

but it is too complicated for DIESEL - you can make it much easier with LISP (in full AutoCAD).

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

 

0 Likes