Vivian,
I am going to take another crack at this program, But I will utilize your method since I now have an idea as to what the variables are. I would like to point out though that I have the air flow direction Left & Right for the reason that you would need to be able to place these Grilles on either side of the duct with respect to Air Flow direction. The rotation feature is only to make the Branchs perpendicular to the main duct. Basically they will look mirrored even though they are not.
See attached image.
You will also need to put the Save User Settings feature in along with the Restore User Settings.
The layer function that I use, Uses the Make sub-command. This will make a new layer if its not in the drawing and set it if it is. I also want to mention that that function will take into account that if a layer in your drawing is frozen, It will then thaw and set it.
Finally there is also all your command calls which are not set to be langauge compatable with versions of Acad that come in other langauges.
Example:
- (command "layer" "n" "GRILLE" "c" "30" "GRILLE" "") Not langauge compatable.(command "_.layer" "_n" "GRILLE" "_c" "30" "GRILLE" "") This is langauge compatable.
I will also put in the default data settings as well.
The code will be alot smaller then the previous one I posted, But will work in the method you would expect. This should bring you much closer to your goal. I will be putting this together over the weekend. I need the practice as well since I have not made any codes in the last few months. I may have it done for early next week.
I will contact you then.
|