View Full Version : Arrows On Midpoint
jmcshane
2006-07-03, 03:52 PM
Hi,
I am trying to write a routine that will stick an arrow block on the midpoint of every line in a drawing indicating the direction in which it was drawn.
Whenever there are just lines in the selection set, it works fine, but whenever there are other objects in the selection set, even though I have filtered out everything but lines, it doesn't work propoerly.
It sticks the arrow block at the mid point of some lines and the start point of others.
I have been looking at this routine line by line for a few days now and I can't figure out where I am going wrong.
I would be very grateful for any suggestions.
I have attached a sample drawing with the block arrow inserted into it.
Cheers
John
I haven't had a chance to look at your code. Do you turn your OSNAPS off prior to placement?
jmcshane
2006-07-03, 04:29 PM
I haven't had a chance to look at your code. Do you turn your OSNAPS off prior to placement?
Whoops
Embarrassed doesn't even begin to describe how I feel at the moment.
I'd spent two days trying to work that one out.
I didn't think the OSNAPS would matter when using SSGET.
Thank you
John
kennet.sjoberg
2006-07-03, 04:58 PM
. . .I didn't think the OSNAPS would matter when using SSGET. . .
John
SSGET is innocent
but not -insert, try this
(command "-insert" "FWEXARWS" "_non" "InsertionPoint "" "" Angle1)
: ) Happy Computing !
kennet
jmcshane
2006-07-03, 05:33 PM
SSGET is innocent
but not -insert, try this
(command "-insert" "FWEXARWS" "_non" "InsertionPoint "" "" Angle1)
That works.
I have also set OSMODE to 0 at the start of the routine.
Where does "_non" come from, and whats its purpose if you don't mind ????
Thank you
John
kennet.sjoberg
2006-07-03, 08:58 PM
That works.
I have also set OSMODE to 0 at the start of the routine.
. . . just do not forget to reset to the user previous settings in the end of. . .
Where does "_non" come from, and whats its purpose if you don't mind ????
OSMODE, snapsettings is the sum of the combination off chosen object snap
.
0 NONe
1 ENDpoint
2 MIDpoint
4 CENter
8 NODe
16 QUAdrant
32 INTersection
64 INSertion
128 PERpendicular
256 TANgent
512 NEArest
1024 QUIck
2048 APParent Intersection
4096 EXTension
8192 PARallel
16384 Disabled
Example 1+2+4+8+32+64=111
OSMODE 111 = ENDpoint+MIDpoint+CENter+NODe+INTersection+INSertion
You can also use the object snap as getdata in the Command prompt
you will find them in the "Object Snap" toolbar
Command: _tt _from _endp _mid _int _appint _ext _cen _qua _tan _per _par _ins _nod _nea _non
And the usage is as in :
(command "-insert" "FWEXARWS" "_non" "InsertionPoint "" "" Angle1)
: ) Happy Computing !
kennet
BTW, Instead of setting (setvar "OSMODE" 0 ) you can use
(setvar "OSMODE" (+ (getvar "OSMODE" ) 16384 ) ) ; Disable
(setvar "OSMODE" (- (getvar "OSMODE" ) 16384 ) ) ; Enable
Look at the [ OSNAP ] button in the statusbar
jmcshane
2006-07-04, 11:06 AM
Nice one Kennet, most informative.
Thanks all for the help.
kennet.sjoberg
2006-07-05, 12:44 AM
Nice one Kennet, most informative.
Thanks all for the help.
I am Glad to help. . .
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.