Lisp Problem - BASE / INSBASE

AutoCAD14 (I know, but I like 14 :-)
I have a Lisp routine for quickly modifying 2D blocks that has always worked perfectly.... until today, when I was modifying a third party drawing.
As part of my Lisp routine, a marker line is drawn that originates from the defined insert point of the block being modified. The line is there to indicate the insert point that was specified when the block was previously created.
When I ran the routine on a block in the third party drawing, the marker line was drawn displaced from the defined block insert point.
I think I have identified the problem as 'INSBASE' (or 'BASE') not being set to (0.0 0.0 0.0). In this case it was set to (7.0 8.5 0.0) and that is the displacement that had been applied to the originating end of the marker line.
How do I resolve this problem?
I tried resetting 'INSBASE' to (0.0 0.0 0.0) and then running my Lisp routine, but it made no difference (which surprised me) and the marker line was still displaced as before.
With 'INSBASE' still set to (0.0 0.0 0.0) I then exploded and redefined the block. I then inserted the (redefined) block and ran my Lisp routine on it. The marker line was still displaced as if 'INSBASE' was still set to (7.0 8.5 0.0).
I noticed that the entity code for the block (assoc 10) still gave the insert point WITH the 'INSBASE' = (7.0 8.5 0.0) displacement applied, even though I had reset 'INSBASE' to (0.0 0.0 0.0).
Maybe I don't fully understand 'INSBASE'. Is the 'INSBASE' setting also stored somewhere else? How can the redefined block entity code (assoc 10) still include this displacement, despite the fact that I've reset it to (0.0 0.0 0.0)? Am I missing something obvious?
Do I have to somehow apply the 'INSBASE' setting to the entity code (assoc 10) insert point to remove the displacement and ensure the marker line originates correctly from the defined insert point of the block?
--
Mike
-Please remove 'safetycatch' from email address before firing off your
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Did you purge the drawing prior to redefining the block?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

No! What would that have achieved?
I set "INSBASE" to (0.0 0.0 0.0) and then redefined the block using the original block name, so all instances of the block should have updated. There were no nested blocks to consider.
--
Mike
-Please remove 'safetycatch' from email address before firing off your
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I don't know if it would achieve anything. It's just that, in my experience, it's better to purger the drawing prior to recreating blocks - especially where attributes are involved.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I don't know if it would achieve anything. It's just that, in my experience, it's better to purge the drawing prior to recreating blocks - especially where attributes are involved.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Then you proberly need to rewrite that by allowing it first to chack that var. and then offsetting everything you use the Lisp rutine for. Checking the insert base shuld be easy and if it is wrong it seem obvious too allow the offset . I would use an easy Mapcar '+ or - for each member of the two lists , It shuld be easy to add a check for if plus or minus are to be used .
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I guess you're right, I have to check the variable "INSBASE" and if it's not (0.0 0.0 0.0), use its setting to correct the displacement.
What I can't get my head round is why the displacement still occurs after I have set "INSBASE" to (0.0 0.0 0.0) and redefined the block. Where else is the displacement stored?
--
Mike
-Please remove 'safetycatch' from email address before firing off your
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I wrote:

I now think this a UCS problem and I need to be looking at the TARGET or UCSORG settings.
Any guidance anyone?
--
Mike
-Please remove 'safetycatch' from email address before firing off your
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Try (setvar "insbase" (getpoint)) and just show where you want the base point to be. That would be tedious if you have a lot of them, so you could write a little macro for it. Oh, and you would probably want to set it back to 0.0 0.0 0.0 when you are done. Had that problem once - I think that's how I got around it. Mal
mlv wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.