Author Topic: Combine 2 commands to one?  (Read 4466 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Combine 2 commands to one?
« on: July 23, 2014, 07:34:13 AM »
Gotta question for you guys. Is there a way to create a lisp or similar that can take two commands, and by the object that you select it will initiate the correct command?

I hope this is a simple idea. Civil3D we have 3D Labels and then there is the Text Types. Usually on the Labels I have to click on a label and right click then edit text to edit the contents of the label. As for text, I typically use the ED command. I did not know if there was a way to combine those into one command?

Just a thought!

Thanks guys
Civil3D 2020

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Combine 2 commands to one?
« Reply #1 on: July 23, 2014, 08:33:22 AM »
You can do it like this pseudo code illustrates

Code: [Select]
(defun c:foo ()
 (select_object)
 (if (object = text or mtext)
   (run the textedit command)
 )
 (if object = AECC*)
   (run the EditLabelText command)
 )
)

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Combine 2 commands to one?
« Reply #2 on: July 23, 2014, 08:43:19 AM »
or it is possible to add it as a double click action, so I have heard
Be your Best


Michael Farrell
http://primeservicesglobal.com/

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Combine 2 commands to one?
« Reply #3 on: July 23, 2014, 08:45:04 AM »
Thank you for that but. I just tried to run the lisp and I get
Code: [Select]
/edit_text.lsp") ; error: extra right paren on input.
As I run FOO
Code: [Select]
; error: no function definition: SELECT_OBJECT
Civil3D 2020

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Combine 2 commands to one?
« Reply #4 on: July 23, 2014, 08:45:36 AM »
or it is possible to add it as a double click action, so I have heard

smart.... smart... :)
Civil3D 2020

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Combine 2 commands to one?
« Reply #5 on: July 23, 2014, 08:53:01 AM »
Thank you for that but. I just tried to run the lisp and I get
Code: [Select]
/edit_text.lsp") ; error: extra right paren on input.


That is not valid lisp code, only an example of _how_ to code it.
Maybe I used the term "pseudo code" incorrectly...? Apologies if so.

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Combine 2 commands to one?
« Reply #6 on: July 23, 2014, 08:59:10 AM »
or it is possible to add it as a double click action, so I have heard

Yes, but I believe you would have to create a double-click action entry for each AECC object type that you might want to edit this way.
For example: AECC_STATION_OFFSET_LABEL, AECC_GENERAL_NOTE_LABEL, AECC_ALIGNMENT_TANGENT_LABEL, etc.


mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Combine 2 commands to one?
« Reply #7 on: July 23, 2014, 09:38:32 AM »
or it is possible to add it as a double click action, so I have heard

Yes, but I believe you would have to create a double-click action entry for each AECC object type that you might want to edit this way.
For example: AECC_STATION_OFFSET_LABEL, AECC_GENERAL_NOTE_LABEL, AECC_ALIGNMENT_TANGENT_LABEL, etc.

Given, however I typically do not edit Labels in this manner, it's no concern of mine. However it can be done.
As any text overrides that I may make to a C3D label are few I still use the Ribbon or Rt-Click operation.
further, given that I still do a lot of training I do not 'customize' C3D, and try to find the must productive methods from the boxed product.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Combine 2 commands to one?
« Reply #8 on: July 23, 2014, 09:49:49 AM »
Quote from: mjfarrell
Given, however I typically do not edit Labels in this manner, it's no concern of mine. However it can be done.
As any text overrides that I may make to a C3D label are few I still use the Ribbon or Rt-Click operation.
further, given that I still do a lot of training I do not 'customize' C3D, and try to find the must productive methods from the boxed product.

Conversely, I started out on vanilla AutoCAD, then Land Desktop, then Civil 3D, and I've used the shortcut "ET" on them all for almost 20 years, so like the OP's request, we have an ET command that edits Civil 3D labels, text, mtext, ArcAlignedText, etc.

Thankfully, Autodesk allows us various ways to do many things.


MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Combine 2 commands to one?
« Reply #9 on: July 23, 2014, 10:27:45 AM »
That's kinda what I was looking for. what you just stated.
Civil3D 2020

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Combine 2 commands to one?
« Reply #10 on: July 23, 2014, 10:38:46 AM »
Quote from: mjfarrell
Given, however I typically do not edit Labels in this manner, it's no concern of mine. However it can be done.
As any text overrides that I may make to a C3D label are few I still use the Ribbon or Rt-Click operation.
further, given that I still do a lot of training I do not 'customize' C3D, and try to find the must productive methods from the boxed product.

Conversely, I started out on vanilla AutoCAD, then Land Desktop, then Civil 3D, and I've used the shortcut "ET" on them all for almost 20 years, so like the OP's request, we have an ET command that edits Civil 3D labels, text, mtext, ArcAlignedText, etc.

Thankfully, Autodesk allows us various ways to do many things.

Correct however most if not all NEW users to C3D do not need the confusion of seeing customized commands or functions
during their training sessions. So I would be doing them no favour to have MY installation of C3D customized to any degree
during a training class. 
Yes it is fantastic that we can customize and build commands to suit our needs!  Again, must don't need to be confused by
seeing commands or function that they will not have access to, right Out of the Box.

And along those lines, this is where I also disagree with most 'implementation' plans that include the establishment of
a 'templates' prior to training. As for me it is imperative that the users ALL know the how and why of Styles creation, and feature settings. But not teaching them these things does them a disservice in the long run.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

tedg

  • Swamp Rat
  • Posts: 811
Re: Combine 2 commands to one?
« Reply #11 on: July 23, 2014, 12:41:06 PM »
Correct however most if not all NEW users to C3D do not need the confusion of seeing customized commands or functions
during their training sessions. So I would be doing them no favour to have MY installation of C3D customized to any degree
during a training class. 
Yes it is fantastic that we can customize and build commands to suit our needs!  Again, must don't need to be confused by
seeing commands or function that they will not have access to, right Out of the Box.

And along those lines, this is where I also disagree with most 'implementation' plans that include the establishment of
a 'templates' prior to training. As for me it is imperative that the users ALL know the how and why of Styles creation, and feature settings. But not teaching them these things does them a disservice in the long run.

I think that's a difference from being in a position of training new users versus being a long-time professional working in the industry working in an established office with office standards and procedures. I agree that all new users need to learn how to create things from scratch and why things are set up the way they are in the native program. They don't always have that level of training when they get a cad job.
 
So yes if you're in a position of training new people, it's best to use OOTB tools etc.
 
If I'm helping someone at thier computer, I need to remember what the native commands are on thier machine, because all my cool tricks won't work.
« Last Edit: July 23, 2014, 12:44:15 PM by tedg »
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023