Quantcast
Channel: Autodesk AutoCAD forums
Viewing all articles
Browse latest Browse all 14319

How to make different start-points for different commands within a single lisp

$
0
0

Hello.

My first lisp, so bring it hard on me :) I want to be an expert in autolisp :)

 

My lisp is meant to do the following:

draw a rectangle with ”0” fillet. It can be done either via rectangle command, or pline command. The attached lisp has the variant with the pline-case.

 

The, I need to draw inside a smaller rectangle, with a fillet value, that is promted and indicated by the user. The smaller rectangle must be centered inside the bigger one.

 

I thought it was a good idea, to take one insertion-point for the bigger rectangle.

and to calculate a 2-nd insertion-point for the smaller rectangle, via "polar" function.

 

What I get:

the 2-nd insertion point is put the same as the 1-st one.

Please take a look at the lisp that I attached... I made a few commentaries inside it. I hope those comments will be more clear )

 

p.s.

I wish to draw the bigger rectangle with one layer "example: Layer 1", and the smaller rectangle with another layer "exmaple: Layer 2".

Please teach me how )


Viewing all articles
Browse latest Browse all 14319

Trending Articles