Results 1 to 6 of 6

Thread: How to tell the difference between Plain AutoCAD and C3D?

  1. #1
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    450
    Login to Give a bone
    0

    Default How to tell the difference between Plain AutoCAD and C3D?

    I want to be able to set the autocad drawing template for QNEW different for each vertical. Is there a system variable I can use to check if AutoCAD is Civil 3D, plain, etc.?

    I will be setting QNEW using the following code:

    Code:
    (vla-put-QNewTemplateFile (vla-Get-Files (vla-Get-Preferences (vlax-get-acad-object))) "U:\\AutoCAD\\Templates\\some_file.dwt")
    Last edited by BlackBox; 2013-12-18 at 11:35 PM. Reason: Please use [CODE] Tags

  2. #2
    AUGI Addict
    Join Date
    2006-04
    Location
    (getpoint "Anywhere on the Enter Key =>")
    Posts
    1,160
    Login to Give a bone
    0

    Default Re: How to tell the difference between Plain AutoCAD and C3D?

    Try this:
    Code:
    (vla-get-caption (vlax-get-acad-object))

  3. #3
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: How to tell the difference between Plain AutoCAD and C3D?

    We use fixed profile names ie. every user has the same profile names. Makes it very easy to tell which application (and in several cases, version) is running.

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: How to tell the difference between Plain AutoCAD and C3D?

    FWIW - Just check if the NOD contains a "Root" entry:

    Code:
    (defun _IsCivilDatabase (/ isCivilDb)
      ;; Example:
      ;; (if (_IsCivilDatabase)
      ;;   (prompt "\nCivil 3D Drawing opened. ")
      ;; )
      (foreach x (entget (namedobjdict))
        (if (and (= 3 (car x)) (= "Root" (cdr x)))
          (setq isCivilDb T)
        )
      )
      isCivilDb
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: How to tell the difference between Plain AutoCAD and C3D?

    Quote Originally Posted by BeKirra View Post
    Try this:
    Code:
    (vla-get-caption (vlax-get-acad-object))
    That will just inform you if the active session is Civil 3D, and not if you've opened a Civil 3D drawing in vanilla AutoCAD.

    Also... If memory serves... Simply opening a vanilla AutoCAD drawing with Civil 3D will append the "Root" entry to NOD.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: How to tell the difference between Plain AutoCAD and C3D?

    Quote Originally Posted by GreyHippo View Post
    I want to be able to set the autocad drawing template for QNEW different for each vertical. Is there a system variable I can use to check if AutoCAD is Civil 3D, plain, etc.?

    I will be setting QNEW using the following code:

    Code:
    (vla-put-QNewTemplateFile (vla-Get-Files (vla-Get-Preferences (vlax-get-acad-object))) "U:\\AutoCAD\\Templates\\some_file.dwt")
    Using the sub-function I just posted:

    Code:
    (vla-put-QNewTemplateFile
      (vla-Get-Files (vla-Get-Preferences (vlax-get-acad-object)))
      (strcat
        "U:\\AutoCAD\\Templates\\"
        (if	(_IsCivilDatabase)
          "MyCivl3DTemplate.dwt"
          "MyAcadTemplate.dwt"
        )
      )
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. 2015: Viewing C3D surfaces in plain AutoCAD
    By jesse.higgins698153 in forum AutoCAD Civil 3D - Surfaces
    Replies: 2
    Last Post: 2015-08-02, 04:50 AM
  2. 2011: Plain AutoCAD + Revit Architecture
    By Detsenira in forum Revit Architecture - General
    Replies: 18
    Last Post: 2011-11-11, 04:11 PM
  3. 2012: ACA & Plain AutoCAD
    By nextvkin in forum ACA General
    Replies: 3
    Last Post: 2011-11-03, 01:37 AM
  4. 2012: Open draped image in plain AutoCAD
    By MrMaia in forum AutoCAD Civil 3D - Surfaces
    Replies: 1
    Last Post: 2011-08-10, 09:57 PM
  5. ADT 2006 to Plain Jane AutoCAD 2010
    By Caddrafter in forum CAD Management - General
    Replies: 3
    Last Post: 2009-10-08, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •