Author Topic: Mech vs Vanilla Version Number  (Read 4639 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 462
Mech vs Vanilla Version Number
« on: February 15, 2011, 06:56:21 PM »
I have mech versions through 2005~2011 but vanilla versions.
I am wondering if there are any difference for the result when using "acadver".
The real question is that how to identify the vanilla and mech version.

Thanks for your help.

HofCAD

  • Guest
Re: Mech vs Vanilla Version Number
« Reply #1 on: February 16, 2011, 03:49:09 AM »
If you go with the command OPTIONS to the tab Profiles,
do you see then the Available Profiles 'Vanilla' and 'AcadM'.
The profile 'Vanilla' is for pure AutoCAD, and 'AcadM' is for
AutoCAD Mechanical.

Regards HofCAD CSI.

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Mech vs Vanilla Version Number
« Reply #2 on: February 16, 2011, 04:14:37 AM »
Sorry, I mean that how to identify the mech/vanilla version in Autolisp.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Mech vs Vanilla Version Number
« Reply #3 on: February 16, 2011, 07:51:38 AM »

I don't have time to test fully, but :

Mechanical is simply Vanilla AutoCAD with Add-ons.

If you manually compare the resulting list from (ARX) at the commandline you will see the different ARX files loaded into Mechanical

"acadm.arx" and "acadmmx.arx" may be a good place to start


So something like the following may assist you (untested)
(if (member "acadm.arx" (arx))
 (alert "This is Mechanical")
)
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.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Mech vs Vanilla Version Number
« Reply #4 on: February 16, 2011, 07:52:16 AM »
Check here, you can use the path method. But there must be another way.
http://www.theswamp.org/index.php?topic=36606.0

I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

HofCAD

  • Guest
Re: Mech vs Vanilla Version Number
« Reply #5 on: February 16, 2011, 11:49:33 AM »
Sorry, I mean that how to identify the mech/vanilla version in Autolisp.
Try this:
Code: [Select]
(defun c:MechOrVanil(/ @getActiveProfile Prof)
(defun @getActiveProfile ()
  (vla-get-activeprofile
    (vla-get-profiles (vla-get-preferences (vlax-get-acad-object)))
  )
)
(setq Prof (strcase (@getActiveProfile)))
(cond
 ((= Prof "ACADM") (princ "\nAutoCAD"))
 ((= Prof "ACADMPP") (princ "\nAutoCAD"))
 ((= Prof "VANILLA") (princ "\nAutoCAD Mechanical"))
 (t (princ "\nNo basic profile"))
)
(princ)
)

Regards HofCAD CSI.
« Last Edit: February 17, 2011, 03:23:01 AM by HofCAD »

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Mech vs Vanilla Version Number
« Reply #6 on: February 16, 2011, 04:47:37 PM »
Thanks, Kerry.
Totally agree with you.

Quote
Mechanical is simply Vanilla AutoCAD with Add-ons.

This is a nice idea.

Code: [Select]
(if (member "acadm.arx" (arx))
 (alert "This is Mechanical")
)

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Mech vs Vanilla Version Number
« Reply #7 on: February 16, 2011, 04:55:38 PM »
Check here, you can use the path method. But there must be another way.
http://www.theswamp.org/index.php?topic=36606.0


Yes, I had something similar last night.

Code: [Select]
"C:\\program files\\autodesk\\acadm 2011\\..."

Thanks, CAB.

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Mech vs Vanilla Version Number
« Reply #8 on: February 16, 2011, 05:00:53 PM »
...
Try this:
Code: [Select]
(defun c:MechOrVanil(/ @getActiveProfile Prof)
(defun @getActiveProfile ()
  (vla-get-activeprofile
    (vla-get-profiles (vla-get-preferences (vlax-get-acad-object)))
  )
)
(setq Prof (strcase (@getActiveProfile)))
(cond
 ((= Prof "ACADM") (princ "\nAutoCAD"))
 ((= Prof "VANILLA") (princ "\nAutoCAD Mechanical"))
 (t (princ "\nNo basic profile"))
)
(princ)
)

Regards HofCAD CSI.

This is nice, too.
Thanks, HofCAD

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Mech vs Vanilla Version Number
« Reply #9 on: February 16, 2011, 05:17:25 PM »
You can't rely on Profiles, every profile here is BEI, so I had to use the path method when I needed to do this, it is the only sure fire way that I have found.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mech vs Vanilla Version Number
« Reply #10 on: February 16, 2011, 05:33:51 PM »
Code: [Select]
(vla-get-caption (vlax-get-acad-object))
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mech vs Vanilla Version Number
« Reply #11 on: February 16, 2011, 05:53:49 PM »
Nice idea Alan  8-)

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mech vs Vanilla Version Number
« Reply #12 on: February 16, 2011, 05:55:14 PM »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Mech vs Vanilla Version Number
« Reply #13 on: February 16, 2011, 06:18:34 PM »
Code: [Select]
(vla-get-caption (vlax-get-acad-object))

Nice idea Alan :-) .. you'll need to account for (setenv "ShowFullPathInTitle" "1") which shows the path of the drawing opened.

"AutoCAD 2009 - [Drawing1.dwg]"

Perhaps something like:
Code: [Select]
(defun woohoo2 (/ p caption)
  (setq caption (vla-get-caption (vlax-get-acad-object)))
  (if (setq p (vl-string-position (ascii "-") caption))
    (substr caption 1 (1- p))
    caption
  )
)
(woohoo2)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Mech vs Vanilla Version Number
« Reply #14 on: February 16, 2011, 06:31:58 PM »
Code: [Select]
(vla-get-caption (vlax-get-acad-object))
I like this. Thanks, Alan.