style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <If
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.-1@WebX.maYIadrTaRb">news:f090b81.-1@WebX.maYIadrTaRb...
I have a specific block that is present in a drawing, is there anyway of
getting the insertion point data of that block via lisp to use as an insertion
point for a different block insertion?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <Thanks,
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.1@WebX.maYIadrTaRb">news:f090b81.1@WebX.maYIadrTaRb...
Lets say the block is called XXX and I know that and I want to limit the
amount of user interaction. I want them to be able to select block XXX or YYY
from a list and then let lisp do the rest based on their selection. Is there a
way to specify that block name rather than picking
it?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Jason Piercey" <
href="mailto:Jason@AtrEng.com">Jason@AtrEng.com> wrote in message
href="news:5A8C90042008417E0333390C6BE604BF@in.WebX.maYIadrTaRb">news:5A8C90042008417E0333390C6BE......
How about this...
(defun InsertInsPt ( BlockName )
(cdr
(assoc 10 (entget (tblobjname "block" BlockName))))
)
;Example:
(InsertInsPt "YourBlockNameHere")
-Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <Thanks,
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.1@WebX.maYIadrTaRb">news:f090b81.1@WebX.maYIadrTaRb...
Lets say the block is called XXX and I know that and I want to limit the
amount of user interaction. I want them to be able to select block XXX or
YYY from a list and then let lisp do the rest based on their selection. Is
there a way to specify that block name rather than picking
it?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Jim Claypool" <
href="mailto:jclaypool@kc.rr.com">jclaypool@kc.rr.com> wrote in message
href="news:4E27602F6BBE1125A980A1D0D107128E@in.WebX.maYIadrTaRb">news:4E27602F6BBE1125A980A1D0D10......
That will return (0.0 0.0 0.0)
(defun InsertInsPt (BlockName)
(setq
ss (ssget "x" (list (cons 2 BlockName))))
(if ss
(cdr (assoc
10 (entget (ssname ss 0))))
(alert (strcat "No " BlockName "
block found: "))
)
)
This assumes only one block named BlockName in
the drawing.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"Jason Piercey" <
href="mailto:Jason@AtrEng.com">Jason@AtrEng.com> wrote in message
href="news:5A8C90042008417E0333390C6BE604BF@in.WebX.maYIadrTaRb">news:5A8C90042008417E0333390C6......
How about this...
(defun InsertInsPt ( BlockName )
(cdr
(assoc 10 (entget (tblobjname "block" BlockName))))
)
;Example:
(InsertInsPt "YourBlockNameHere")
-Jason
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <Thanks,
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.1@WebX.maYIadrTaRb">news:f090b81.1@WebX.maYIadrTaRb...
Lets say the block is called XXX and I know that and I want to limit
the amount of user interaction. I want them to be able to select block XXX
or YYY from a list and then let lisp do the rest based on their selection.
Is there a way to specify that block name rather than picking
it?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <If
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.-1@WebX.maYIadrTaRb">news:f090b81.-1@WebX.maYIadrTaRb...
I have a specific block that is present in a drawing, is there anyway of
getting the insertion point data of that block via lisp to use as an insertion
point for a different block insertion?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"DonB" <
href="mailto:design@butler-plumbing.com">design@butler-plumbing.com>
wrote in message
href="news:C7CECE221FD4EF3EC584C882D42CD485@in.WebX.maYIadrTaRb">news:C7CECE221FD4EF3EC584C882D42......
This is why I mention including your ACAD release
in my latest post. Hopefull you are running R2000 or above.
Try this..
Rotate the current UCS by 90d in Z
axis
Insert a block.
Switch back to the previous UCS.
(defun c:prac ()
(alert "This will not return
a point in the WCS")
(cdr (assoc 10 (entget (car (entsel "\nSelect
Insert: ")))))
)
(defun c:prac2 ()
(alert "This will return a point in the
WCS")
(vl-load-com)
(setq obj (vlax-ename->vla-object
(car (entsel "\nSelect Insert: "))))
(vlax-safearray->list
(vlax-variant-value (vla-get-insertionPoint Obj)))
)
Don
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <If
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.-1@WebX.maYIadrTaRb">news:f090b81.-1@WebX.maYIadrTaRb...
I have a specific block that is present in a drawing, is there anyway of
getting the insertion point data of that block via lisp to use as an
insertion point for a different block
insertion?
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <Thanks
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.7@WebX.maYIadrTaRb">news:f090b81.7@WebX.maYIadrTaRb...
Jim,
Is the 'x' supposed to be a certain value .... I get a too few arguments
error when I try to run it
here's the code I used:
(defun c:InsertInsPt (phil)
(setq ss (ssget "x" (list (cons 2
phil))))
(if ss
(cdr (assoc 10 (entget (ssname ss
0))))
(alert (strcat "No " phil " block found: "))
)
)
'phil' is the name of the block that is
defined.
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
"enerflex" <(defun
href="mailto:phil.garinger@enerflex.com">phil.garinger@enerflex.com>
wrote in message
href="news:f090b81.9@WebX.maYIadrTaRb">news:f090b81.9@WebX.maYIadrTaRb...
InsertInsPt (phil / ss)
(setq ss (ssget "x" (list (cons 2 phil))))
(if ss
(cdr (assoc 10 (entget (ssname ss 0))))
(alert (strcat "No " phil " block found: "))
)
)
I thought this might be a little easier way of corresponding ... I hope you
don't mind.
I'm a little rusty on the lisp end of things but I basically
understand what is going on here.
The block name is 'phil' and the
insertion point is 2,2,0.
ssget "x" will return all the objects in the
drawing.
I'm not real clear on what cons does.
when I attempt to run this, I get a bad SSGET list value.
any help that you might be able to provide would be greatly
appreciated