Author Topic: if no choice the surface ,Can't continue until chose the face  (Read 5684 times)

0 Members and 1 Guest are viewing this topic.

andy_lee

  • Newt
  • Posts: 147
Dear all

We know (vl-cmdf "_.UCS" "_F") is returns T , and  (command "_.UCS" "_F") is returns nil

I want know
when I use  (command "_.UCS" "_F") or   (vl-cmdf "_.UCS" "_F"),   if  no choice the surface ,Can't continue  until  chose the face.
Is there any way to do it?
andy.
Best regards.

77077

  • Guest
Re: if no choice the surface ,Can't continue until chose the face
« Reply #1 on: August 02, 2015, 06:25:00 AM »
I think no possible

mianbaoche

  • Guest
Re: if no choice the surface ,Can't continue until chose the face
« Reply #2 on: August 02, 2015, 07:29:13 AM »
andy_lee Try!

Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt()
  2.   (setq org (getvar "UCSORG"))
  3.   (vl-cmdf "_.UCS" "_F")
  4.   (while (null (equal 0 (distance (getvar "UCSORG" ) org) 1e-6))(vl-cmdf ""))
  5.  )

« Last Edit: August 02, 2015, 02:29:56 PM by mianbaoche »

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #3 on: August 03, 2015, 04:24:03 AM »
andy_lee Try!

Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt()
  2.   (setq org (getvar "UCSORG"))
  3.   (vl-cmdf "_.UCS" "_F")
  4.   (while (null (equal 0 (distance (getvar "UCSORG" ) org) 1e-6))(vl-cmdf ""))
  5.  )

Hi mianbaoche
The trouble is still exist .  Can use Dxf or vla to solve?
andy.
Best regards.

mianbaoche

  • Guest
Re: if no choice the surface ,Can't continue until chose the face
« Reply #4 on: August 03, 2015, 04:34:41 AM »
You can tell what the results,continue  until  to do?

To speak clearly and easily understand

Can use Dxf or vla to solve?Not very understanding。

77077

  • Guest
Re: if no choice the surface ,Can't continue until chose the face
« Reply #5 on: August 03, 2015, 05:15:44 AM »
I said that is not possible.
OP's describe is very clearly.  if this is  possible, Lee , roy ,ron  has given the answer.

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #6 on: August 03, 2015, 06:05:56 AM »
Ok, Thanks guys.  I abandoned. :oops:
andy.
Best regards.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: if no choice the surface ,Can't continue until chose the face
« Reply #7 on: August 04, 2015, 12:48:29 AM »
andy_lee,
What is your goal ?

Do you require to set the UCS to a solid face without selecting the face ??

Do you have difficulty selecting/choosing the face ?

Are you unable to select the face for some reason ?

If you don't select the face, how do you imagine the UCS can be set ??

More explicit details of your requirements may help to find an answer.


//-----------------
added:
I have been watching this thread and noticed a lot of nasty behaviour which required deleted posts.
Please be a little nicer to each other ... we are ALL here to learn, not to play silly mean games.


« Last Edit: August 04, 2015, 01:21:23 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #8 on: August 04, 2015, 01:50:56 AM »
Hi Kerry
What happened?

sorry for my english .
Code - Auto/Visual Lisp: [Select]
  1.   (setq cmde (getvar 'cmdecho))
  2.   (setvar 'cmdecho 1)
  3.   (if e
  4.     (progn
  5.       (command "_.copybase" "_non" p e "" "")
  6.       (entdel e)
  7.       (prompt "\nPick face of 3D solid (edge which is parallel to Trapezoid top edge), then adjust UCS further more (Xflip, Yflip, next face if wrong picked) and then press ENTER to accept...")
  8.       (command "_.UCS" "_F")
  9.  

;;if  no choice the surface ,Can't continue

Code - Auto/Visual Lisp: [Select]
  1.       (while (< 0 (getvar 'cmdactive)) (command "\\"))
  2.       (setq p (getpoint "\nPick or specify top center point to place Trapezoid : "))
  3.       (command "_.pasteclip" "_non" p)
  4.       (command "_.rotate" (entlast) "" "_non" p "\\")
  5.     )
  6.   )
  7.   (command "_.UCS" "_P")
  8.   (*error* nil)
  9.  

The complete code from here:
Thanks marko.
http://www.theswamp.org/index.php?topic=49800.msg550233#msg550233
« Last Edit: August 04, 2015, 01:55:40 AM by andy_lee »
andy.
Best regards.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: if no choice the surface ,Can't continue until chose the face
« Reply #9 on: August 04, 2015, 01:56:52 AM »


So, you have resolved the problem ??
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #10 on: August 04, 2015, 01:58:47 AM »


So, you have resolved the problem ??

No solution .
andy.
Best regards.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: if no choice the surface ,Can't continue until chose the face
« Reply #11 on: August 04, 2015, 02:01:00 AM »

Please read my post again.

What is your actual problem  ???
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #12 on: August 04, 2015, 02:04:29 AM »

Please read my post again.

What is your actual problem  ???

 :cry: :cry: :cry:
http://www.theswamp.org/index.php?topic=49875.msg550678#msg550678

code...
I wrote explanatory notes here.
code...
andy.
Best regards.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: if no choice the surface ,Can't continue until chose the face
« Reply #13 on: August 04, 2015, 02:09:00 AM »

Please read my post again.

What is your actual problem  ???

 :cry: :cry: :cry:
http://www.theswamp.org/index.php?topic=49875.msg550678#msg550678

code...
I wrote explanatory notes here.
code...

What good is posting 'code' as an explanation for a problem if the code doesn't work.

I want you to read my post and answer the questions I asked.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

andy_lee

  • Newt
  • Posts: 147
Re: if no choice the surface ,Can't continue until chose the face
« Reply #14 on: August 04, 2015, 02:48:41 AM »

Please read my post again.

What is your actual problem  ???

 :cry: :cry: :cry:
http://www.theswamp.org/index.php?topic=49875.msg550678#msg550678

code...
I wrote explanatory notes here.
code...

What good is posting 'code' as an explanation for a problem if the code doesn't work.

I want you to read my post and answer the questions I asked.

Hi kerry
if use entsel function can like this :
(while (progn (null (setq e (entsel "\nPlease choose ."))))) ;; if no choose anything , can't continue or exit

as the same ,I need
 
when (command "_.UCS" "_F") , if no choose any face of 3d solid  ,can't run behind code

 (setq p (getpoint "\nPick or specify top center point to place Trapezoid : "))
 (command "_.pasteclip" "_non" p)
 (command "_.rotate" (entlast) "" "_non" p "\\")


andy.
Best regards.