Author Topic: Two different 2017 Revcloud commands!  (Read 1642 times)

0 Members and 1 Guest are viewing this topic.

cadpoobah

  • Newt
  • Posts: 48
Two different 2017 Revcloud commands!
« on: July 28, 2016, 01:36:25 PM »
I have a custom Revcloud command that calls AutoCAD's native REVCLOUD command. It worked in 2014, but now doesn't in 2017.

I just realized that "REVCLOUD" and (command ".REVCLOUD") produce different prompts:

Quote
Command: .REVCLOUD
Minimum arc length: 1'-0"   Maximum arc length: 1'-0"   Style: Normal   Type: Rectangular
Specify first corner point or [Arc length/Object/Rectangular/Polygonal/Freehand/Style/Modify] <Object>:

Quote
Command: (command ".revcloud")
Minimum arc length: 1'-0"   Maximum arc length: 1'-0"   Style: Normal   Type: Freehand
Specify start point or [Arc length/Object/Style] <Object>:

So, it doesn't appear possible to generate a Rectangular revision cloud using:
Code: [Select]
(command ".revcloud" "R")
You would have to do something like this:
Code: [Select]
(setq pt1 "\nFirst corner: "
        pt2 (getcorner pt1 "\nOther corner: "))
(command ".RECTANG" pt1 pt2)
(command ".Revcloud" "O" (entlast) "")


The main disadvantage is that you don't see the cloud being generated in real-time, the way you do using the command itself. No a big deal, but I prefer my custom functions to have the same look & feel as a native AutoCAD function.

Is there any way around this?
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Two different 2017 Revcloud commands!
« Reply #1 on: July 28, 2016, 02:12:40 PM »
Try using (initcommandversion) before the command expressions.

cadpoobah

  • Newt
  • Posts: 48
Re: Two different 2017 Revcloud commands!
« Reply #2 on: July 28, 2016, 02:32:29 PM »
Try using (initcommandversion) before the command expressions.

Fantastic! Thanks, @Lee Mac!

So, are there any other commands that require this? What determines when it's needed?

Thanks!!
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle

cadpoobah

  • Newt
  • Posts: 48
Re: Two different 2017 Revcloud commands!
« Reply #3 on: July 28, 2016, 02:35:16 PM »
Try using (initcommandversion) before the command expressions.

Fantastic! Thanks, @Lee Mac!

So, are there any other commands that require this? What determines when it's needed?

Thanks!!

Decided to do some of my own research! Interesting:
Quote
This only affects commands that have been updated to support a command version. In such commands, a test for an initialized command version replaces the legacy test for whether the command is being run from AutoLISP or a script. When a supported command is being run manually, the default version is 2 (or the latest version). When a command is being run from automation, the default version is 1.
Chris Lindner
Onebutton CAD Solutions
----------------------------------------------------
www.onebuttoncad.com #dayjob
www.unpavedart.com    #sidehustle