Jump to content

Recommended Posts

Posted

Hello everyone

 

What i want is to start "dimbaseline" command, select one dimension for baseline (draw it), end that command automatically after one baseline is created, and start "dimcontinue".

 

I did try something, but...

 

(defun c:4 ()

(command "_dimbaseline")

(exit)

(command "_dimcontinue"

)

 

And:

 

(defun c:4 ()

(command "_dimbaseline")

(command)

(command "_dimcontinue"

)

 

 

And several variations :D but, no go.

 

Thanks in advance!

Posted

Sorry, I may be looking at this the wrong way, but why not just:

 

(command "_dimcontinue" "_S")
(while (> (getvar "cmdactive") 0) (command pause))

Posted
Sorry, I may be looking at this the wrong way, but why not just:

 

(command "_dimcontinue" "_S")
(while (> (getvar "cmdactive") 0) (command pause))

 

Sorry, i know extremely little about LISP, did try to input this code, but main problem is how to end dimbaseline after first base line is created.

Posted

Doesn't dimbaseline require you to select a dimension? not draw one?

Posted

After selecting, base dimension is drawn. So what i want is after that first one is created, to end dimbaseline and go automatically to dimcontinue.

Posted

Perhaps;

 

(command "_dimbaseline" "_S" pause pause "" "")
(command "_dimcontinue" "_S")
(while (> (getvar "cmdactive") 0) (command pause))

Posted
Perhaps;

 

Hmmmm..... Maybe i'm doing something wrong. This doesn't start dimbaseline. Starts with dimcontinue...

Posted

How is the whole thing suppose to look? Starting with (defun:....

Posted

Just dump them in a test function like:

 

(defun c:test ()
(command "_dimbaseline" "_S" pause pause "" "")
(command "_dimcontinue" "_S")
(while (> (getvar "cmdactive") 0) (command pause))
(princ)
)

 

I think the functions will act differently depending upon whether you already have dimensions in the drawing, or whether the last thing you created was a dimension.

Posted
Just dump them in a test function like:

 

That's it!

I even modified it a bit so everything is automated. Lee Mac, thanks a million!

 

(defun c:test ()
(command "_dimbaseline" "_S" pause pause "" "")
(command "_dimcontinue" "l")
(while (> (getvar "cmdactive") 0) (command pause))
(princ)
)

Posted

Nice one! Glad we finally got there in the end :)

 

Happy to help :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...