Message 1 of 5
Patterns for subroutine library
Not applicable
05-10-2006
08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am starting to develop a subroutine library for .net, and would like some opinions on:
1) do most people just write all the transaction code in their main code, or do they write subs to do things like draw a
line or select whatever?
I am thinking I need to make simple user functions like DrawLine or DrawPline to hide all the transaction stuff.
2) Is it better to pass in a transaction object outside the functions like Drawline? I have heard its slow to
constantly grab a transaction and close it. If I need to draw multiple things, I could reuse that trans object.
What are the dangers of doing this (assuming I do the basics right like dispose and all)?
3) anyone started such an effort, and could they share some stuff?
I feel like we are back in the days of when Maximizing Autolisp for R12 was written. Lisp was catching on and every
company started to have a collection of lisps, but very few people were good at authoring autolisp.
That book explained how to make user functions to wrap the bare lisp functions.
I remember buying it with my own money when I was just out of college. My company would not pay for it but it was worth
it. The arx help files (and NG's) seem to be the guiding light for now.
thanks
James Maeding
Civil Engineer and Programmer
jmaeding - athunsaker - com
1) do most people just write all the transaction code in their main code, or do they write subs to do things like draw a
line or select whatever?
I am thinking I need to make simple user functions like DrawLine or DrawPline to hide all the transaction stuff.
2) Is it better to pass in a transaction object outside the functions like Drawline? I have heard its slow to
constantly grab a transaction and close it. If I need to draw multiple things, I could reuse that trans object.
What are the dangers of doing this (assuming I do the basics right like dispose and all)?
3) anyone started such an effort, and could they share some stuff?
I feel like we are back in the days of when Maximizing Autolisp for R12 was written. Lisp was catching on and every
company started to have a collection of lisps, but very few people were good at authoring autolisp.
That book explained how to make user functions to wrap the bare lisp functions.
I remember buying it with my own money when I was just out of college. My company would not pay for it but it was worth
it. The arx help files (and NG's) seem to be the guiding light for now.
thanks
James Maeding
Civil Engineer and Programmer
jmaeding - athunsaker - com