Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wrong Insertion Point...

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
216 Views, 11 Replies

Wrong Insertion Point...

Hi !!
I use A2K2.
I'm having trouble with a couple of lisp routines (attached).
I didn't write them, I'm just trying to debug them.
The first routine BLKEDIT allows you to choose a block to edit. Attached is a drawing with the block I want to modify - change all colours to bylayer - say.
So I edit the block, then use BLKDONE to reassemble the block. The problem is that the insertion point of the redefined block is wrong !!
I've tried REFEDIT, but am not fussed by it.
Any help would be appreciated !!
Thanks in advance,

M@
11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: Anonymous

Attached??


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Hi
!!
I use A2K2.
I'm having trouble with a couple of lisp routines
(attached).
I didn't write them, I'm just trying to debug them.
The
first routine BLKEDIT allows you to choose a block to edit. Attached is a
drawing with the block I want to modify - change all colours to bylayer - say.

So I edit the block, then use BLKDONE to reassemble the block. The problem
is that the insertion point of the redefined block is wrong !!
I've tried
REFEDIT, but am not fussed by it.
Any help would be appreciated !!

Thanks in advance,

M@

Message 3 of 12
Anonymous
in reply to: Anonymous

I'd swear I did that !!
Any help would be appreciated Paul.
Here goes :
Message 4 of 12
Anonymous
in reply to: Anonymous

Hey, this is strange!

It all looks okay till (command "-block" bn "y"
inspt parts ""). Your inspt is is correct here but when you do (command
"-insert" bn inspt xs ys ra) the insertionpoint of  the block is
wrong.

I don't have time enough rigth now, but i can look
into it later or anybody else knows the problem.

 


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I'd
swear I did that !!
Any help would be appreciated Paul.
Here goes :
Message 5 of 12
Anonymous
in reply to: Anonymous

After I rem'ed this section it ran fine....

 

;      (if (/= 1.0 (abs
xs))
;        (command "scale" parts ""
inspt (/ 1 (abs xs)))
;      )


--

+++++++++++++++++++++++++++++++++++
Glen Shaw 
-  Software Specialist

href="mailto:shawglen@GSKTechnologies.com">shawglen@GSKTechnologies.com

 

E-Page

href="mailto:shawglen@pager.mobility.com">shawglen@pager.mobility.com

BN
Telephone  :
450.923.8281
Fax                
: 450.923.0951
Alpha-Pager    : 514.580.8486

 


 

GSK Technologies Inc.


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

Hey, this is strange!

It all looks okay till (command "-block" bn "y"
inspt parts ""). Your inspt is is correct here but when you do (command
"-insert" bn inspt xs ys ra) the insertionpoint of  the block is
wrong.

I don't have time enough rigth now, but i can
look into it later or anybody else knows the problem.

 


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I'd
swear I did that !!
Any help would be appreciated Paul.
Here goes :
Message 6 of 12
Anonymous
in reply to: Anonymous

Yes, but then is the scale of the block
incorrect.

It also goes wrong if you manually explode the
block and do -block ..., if you insert it, it has the same wrong insertionpoint
as in the routine. Maybe it's a problem in the drawing or a
setting?


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

After I rem'ed this section it ran fine....

 

;      (if (/= 1.0 (abs
xs))
;        (command "scale" parts ""
inspt (/ 1 (abs xs)))
;      )


--

+++++++++++++++++++++++++++++++++++
Glen Shaw 
-  Software Specialist

href="mailto:shawglen@GSKTechnologies.com">shawglen@GSKTechnologies.com

 

E-Page

href="mailto:shawglen@pager.mobility.com">shawglen@pager.mobility.com


BN Telephone  :
450.923.8281
Fax                
: 450.923.0951
Alpha-Pager    : 514.580.8486

 


 

GSK Technologies Inc.


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">

Hey, this is strange!

It all looks okay till (command "-block" bn "y"
inspt parts ""). Your inspt is is correct here but when you do (command
"-insert" bn inspt xs ys ra) the insertionpoint of  the block is
wrong.

I don't have time enough rigth now, but i can
look into it later or anybody else knows the problem.

 


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I'd
swear I did that !!
Any help would be appreciated Paul.
Here goes
:
Message 7 of 12
Anonymous
in reply to: Anonymous

I think that it has something to do with a non-zero
object coordinate system in that block.  Try a nested entity copy routine
like that in Express tools and you'll see displacement as well.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I'd
swear I did that !!
Any help would be appreciated Paul.
Here goes :
Message 8 of 12
Anonymous
in reply to: Anonymous

Thanks for all your input !!
I'm still troubled by this.
The code is so simple (could be simpler, no doubt),
that it should be obvious what the problem is.
I changed INSBASE on the drawing to 0,0,0 - and this didn't help.
I inserted the block at 0,0,0 x,y,z scale at 1, put ucs at WORLD, performed the blkedit, blkdone and still got the wrong insertion point, though a different one than previously.
It seems to be only this block that produces the error also.
Uurrghhhhhhh !!
Can anybody else spread any light on this ??

Thanks,
M@
Message 9 of 12
Anonymous
in reply to: Anonymous


(I did a wblock) and

I noticed that the "base" of the block drawing was at
0.5,0.5

 

Are your other blocks also like this?

--

+++++++++++++++++++++++++++++++++++
Glen Shaw  - 
Software Specialist

href="mailto:shawglen@GSKTechnologies.com">shawglen@GSKTechnologies.com

 

E-Page

href="mailto:shawglen@pager.mobility.com">shawglen@pager.mobility.com

BN
Telephone  :
450.923.8281
Fax                
: 450.923.0951
Alpha-Pager    : 514.580.8486

 


 

GSK Technologies Inc.


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Thanks
for all your input !!
I'm still troubled by this.
The code is so
simple (could be simpler, no doubt),
that it should be obvious what the
problem is.
I changed INSBASE on the drawing to 0,0,0 - and this didn't
help.
I inserted the block at 0,0,0 x,y,z scale at 1, put ucs at WORLD,
performed the blkedit, blkdone and still got the wrong insertion point, though
a different one than previously.
It seems to be only this block that
produces the error also.
Uurrghhhhhhh !!
Can anybody else spread any
light on this ??

Thanks,
M@

Message 10 of 12
Anonymous
in reply to: Anonymous

I think there is something wrong in the block
definition of block "wcolumn" in your drawing. After I inserted the block to 0,0
, scalefactor 1, created a wblock, inserted in a new drawing, scale 250
rotationangle 90, blkedit and blkdone worked OK.


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Thanks
for all your input !!
I'm still troubled by this.
The code is so
simple (could be simpler, no doubt),
that it should be obvious what the
problem is.
I changed INSBASE on the drawing to 0,0,0 - and this didn't
help.
I inserted the block at 0,0,0 x,y,z scale at 1, put ucs at WORLD,
performed the blkedit, blkdone and still got the wrong insertion point, though
a different one than previously.
It seems to be only this block that
produces the error also.
Uurrghhhhhhh !!
Can anybody else spread any
light on this ??

Thanks,
M@

Message 11 of 12
Anonymous
in reply to: Anonymous

>Glen Shaw
>(I did a wblock) and
>I noticed that the "base" of the block drawing was at 0.5,0.5
>Are your other blocks also like this?
>I didn't even realise blocks could have their own BASE !!
>Funny how you miss the fundamentals sometimes !!

The block is just an 'isolated incident' from a structural design output.
I just wanted to find out why it behaves differently and whether the program
can be changed to cater for such an occurrance.
Without any research, I'm guessing the tblsearch will bring this info up ??
Easy enough from there I guess !!

Thanks for your help everyone !!

Regards,

M@
Message 12 of 12
Anonymous
in reply to: Anonymous

Testing new system.

Ignore !!!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost