Jump to content
jremiro

Inserted block begin at end of a pline instead of the beginning

Recommended Posts

jremiro

I have a lisp routine that we have used for several years. The routine takes a pline, offsets it on either side based on user defined spacing then inserts a premade block to symbolize a road. The block is spaced according to user defined spacing. For instance, a block can be inserted at 2 times the width of the "road" as many times as needed to symbolize the entire length of the offset pline. Hopefully this makes sense! This lisp routine works great on it's own. However, once inserted into a macro, it starts the block insertion at the end of the pline, only inserting one block. This is happening in all versions of AutoCAD we are using from 2004 through 2011. Is there a setvar that should be reset or cleared within the lisp routine? Any suggestions would be appreciated. Thanks!

Share this post


Link to post
Share on other sites
ketxu

Where is your code ^^ ? What message when you used ur marco ? (You can press F2 to read it)

Share this post


Link to post
Share on other sites
jremiro

This is an AutoLisp routine that was written several years ago that has survived several versions of AutoCAD. The routine, along with specific user input including a block name, has been put into a drop down menugroup. When selecting from the menugroup, I have this problem (the block inserting at the end of the line). When I launch this lisp routine from the command line, it inserts the first block at the beginning of the pline and additional copies of the block along the line spaced according to user input. This morning I discovered this only happens if I run the routine from the command line first. If I select from the pulldown menu first, it will default in both instances to the end of the pline. I don't get any error messages. Thanks again.

Share this post


Link to post
Share on other sites
Lee Mac

Have all local variables been declared local to the function? It sounds like a variable is holding its value and hence the program is starting from where it left off.

Share this post


Link to post
Share on other sites
ketxu

So what code of marco in your menu ? Maybe it's sth different between your commandline version and assigned menu pulldown? ^^

Share this post


Link to post
Share on other sites
jremiro

Thanks for the reply. Although I'm fairly weak in LISP code, I think all variables are local. I've yet to come up with a solution so will continue to appreciate all replies. Thanks again.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...