Results 1 to 5 of 5

Thread: Problem with trying to set a civil 3d setting

  1. #1
    Active Member
    Join Date
    2009-03
    Posts
    63
    Login to Give a bone
    0

    Default Problem with trying to set a civil 3d setting

    So I might be jumping in over my head here, but I have a minority of users (3 out 70) that dislike the event viewer in civil 3d and disable it in their drawings. Not enough of the user base to justify changing the setting in our templates but I see no harm letting those turn off that particular vista (its a drawing specific setting). Anyways I was hoping to automate it for them but I'm running into a snag. Here's a snippet

    Code:
    (setq acadObject (vlax-get-acad-object))
    (setq C3D (vla-getinterfaceobject acadObject "AeccXUiLand.AeccApplication.10.4"))
    (setq c3ddoc (vla-get-activedocument c3d))
    (setq c3dsettings (vla-get-settings c3ddoc))
    (setq c3dgeneral (vla-get-generalsettings c3dsettings))
    (setq settings (vlax-get-property c3dsettings 'generalsettings))
    (setq amb (vlax-get-property settings 'ambientsettings))
    (setq gen (vlax-get-property amb 'generalsettings))
    (setq evtview (vlax-get-property gen 'showeventviewer))
    (vlax-put-property evtview 'value :vlax-false)
    ; error: Automation Error. This property is read only
    the object saved to evtview shows several values that change if I use the dialogue boxes in the toolspace pallet but I can't seem to set the properties through vlisp code. I'm probably taking a wrong turn somewhere. Does anyone have any insight into my problem here?

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

    Default Re: Problem with trying to set a civil 3d setting

    As you've found out, many C3D Properties are not fully exposed, even if you can access them.

    That said, you can write a small .NET app which can call the HIDEEVENTVIEWER Command from within an Event Handler (reactor), as you cannot call Commands in a Visual LISP Reactor... That of course, if you didn't just modify the appropriate Property from Civil 3D .NET API.

    I may be missing another simple solution; it's been a long, l o n g day here.

    HTH
    "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

  3. #3
    Active Member
    Join Date
    2009-03
    Posts
    63
    Login to Give a bone
    0

    Default Re: Problem with trying to set a civil 3d setting

    lol, this is just more proof that I need to find the time to learn .net. I kinda suspected it was something along those lines with this one. Thanks anyways.

  4. #4
    Active Member
    Join Date
    2009-03
    Posts
    63
    Login to Give a bone
    0

    Default Re: Problem with trying to set a civil 3d setting

    if anyone is curious, the guy who asked me to change our company template to begin with did his own post on another forum and got an answer

    http://forums.autodesk.com/t5/autoca...r/td-p/5238115

    apparently I DID take a wrong turn, I went to ambient settings through generalsettings, instead of drawingsettings. the fact that it is a drawing specific setting should have tipped me off I guess.
    Last edited by ccalder; 2014-08-28 at 02:30 PM. Reason: fixed bb code

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

    Default Re: Problem with trying to set a civil 3d setting

    Quote Originally Posted by ccalder View Post
    if anyone is curious, the guy who asked me to change our company template to begin with did his own post on another forum and got an answer

    http://forums.autodesk.com/t5/autoca...r/td-p/5238115

    apparently I DID take a wrong turn, I went to ambient settings through generalsettings, instead of drawingsettings. the fact that it is a drawing specific setting should have tipped me off I guess.
    I overlooked that observation as well; Jeff is my hero... Glad you got it sorted.
    "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. 2014: Civil 3D 'shared reference point tool' and 'Integration with Civil 3D' revit extension problem?
    By alex.bell.252970 in forum Revit Structure - United Kingdom
    Replies: 0
    Last Post: 2013-11-26, 02:15 PM
  2. Problem setting up exiting DB as annotative
    By cwjean76 in forum Dynamic Blocks - Technical
    Replies: 5
    Last Post: 2009-11-02, 05:18 PM
  3. problem setting profiles via acad.lsp
    By tbuck in forum AutoCAD CUI Menus
    Replies: 2
    Last Post: 2008-11-18, 07:47 PM

Posting Permissions

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