Custom Variable

Custom Variable

WonkaPet
Advocate Advocate
1,329 Views
2 Replies
Message 1 of 3

Custom Variable

WonkaPet
Advocate
Advocate

Hi there,

 

I was just wondering if anyone had a solution to this problem.

Similar to AutoCAD's native OFFSET routine I'd like my routine to be able to "remember" the unit type and the unit value (ie ft / 5.0, m /  5.0). The OFFSET routine is able to remember the unit value using the OFFSETDIST system variable.

 

Is there anyway to store my own custom variables on a per drawing basis so that if a user opens another drawing I'd be able to display those values in my routine? I don't want to use the USERS1-5 variables if possible.

 

Thanks,

0 Likes
Accepted solutions (1)
1,330 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant

Hi,

 

You can probably get some inspiration from these old but still relevant topics from Kean Walmsley's blog:

Per-document data in .NET applications - Part 1

Per-document data in .NET applications - Part 2



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 3

_gile
Consultant
Consultant
Accepted solution

You also can register custom system variables.

You can see the Variable class in the developper's documentation and this example at TheSwamp.

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes