See the top rated post in this thread. Click here

Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 52

Thread: Drawing a line in model space

  1. #21
    Active Member
    Join Date
    2012-11
    Location
    Italy
    Posts
    65
    Login to Give a bone
    0

    Default Re: Drawing a line in model space

    I'm a "partial" student since my job is another one but I'am quite attracted from Autocad automation. so I can mainly dedicate holidays time to it.
    but let's go on.

    I'm on my VS2010 ultimate where I had already specified the path for opening Autocad in the 'Start external program' textbox of Debug Tab of "Properties" menuitem in the Project properties
    Then I click "play", Autocad starts, I give "netload" command, select my assembly and finally give the proper command ("RibbonSplitButton") to have my routine start.
    but my breakpoints are not observed.
    And I actually think it can't be different, since whenever I search (\bin\debug, obj\debug\) when in netload dialog window I can only find dlls resulting from my last "building"

    what am I missing?

    one thing I also noticed: when Autocad starts form the debugger, it's quite slow when loading "metrics"

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

    Default Re: Drawing a line in model space

    Quote Originally Posted by RICVBA View Post
    I'm a "partial" student since my job is another one but I'am quite attracted from Autocad automation. so I can mainly dedicate holidays time to it.
    but let's go on.

    I'm on my VS2010 ultimate where I had already specified the path for opening Autocad in the 'Start external program' textbox of Debug Tab of "Properties" menuitem in the Project properties
    Then I click "play", Autocad starts, I give "netload" command, select my assembly and finally give the proper command ("RibbonSplitButton") to have my routine start.
    but my breakpoints are not observed.
    And I actually think it can't be different, since whenever I search (\bin\debug, obj\debug\) when in netload dialog window I can only find dlls resulting from my last "building"

    what am I missing?

    one thing I also noticed: when Autocad starts form the debugger, it's quite slow when loading "metrics"
    I do not believe that launching Metric in lieu of Imperial should make any difference.

    Just to be clear, you're launching AutoCAD via debug, but your Solution Configuration, and Solution Platforms dropdown menus in VS IDE is set for 'Debug' and 'Any CPU' (based on the code I posted; if you've added COM, then you must select the appropriate environment, as 2010 .NET Framework does not support dynamics), right?

    The assembly you should be loading will be found at the path specified in Project Properties, Build tab, Output, Output path textbox... Also, under Project Properties, Debug, General, be sure that you've not manually overridden the 'Active (Debug)' Configuration, or the 'Active (Any CPU)' Platform settings, and that the Define DEBUG/TRACE Constants are checked.

    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

  3. #23
    Active Member
    Join Date
    2012-11
    Location
    Italy
    Posts
    65
    Login to Give a bone
    0

    Default Re: Drawing a line in model space

    I attach screenshots from my VS setting
    It seems to me everything is as you depicted it
    but cannot find:
    - "Project Properties, Debug, General" tab
    - Define DEBUG/TRACE Constants checkbox

    As for COM, I'm actually referencing:
    - Autodesk.AutoCAD.Interop
    - Autodesk.AutoCAD.Interop.Common

    have I to remove them?
    Attached Images Attached Images

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

    Default Re: Drawing a line in model space

    Quote Originally Posted by RICVBA View Post
    I attach screenshots from my VS setting
    It seems to me everything is as you depicted it
    but cannot find:
    - "Project Properties, Debug, General" tab
    - Define DEBUG/TRACE Constants checkbox

    As for COM, I'm actually referencing:
    - Autodesk.AutoCAD.Interop
    - Autodesk.AutoCAD.Interop.Common

    have I to remove them?
    This is where it gets tough to work through.

    Your second picture, correctly depicts the Project Properties, Debug tab, General area (under Configuration, and Platform), and both DEBUG/TRACE are checked.

    I do not use COM references unless absolutely necessary, and the code I posted is pure .NET, so you might try it without them, but I'm not sure that it makes any difference unless you've added using statements, or instantiate a COM Class, etc. Also, be sure that all of your ObjectDBX references are set Copy Local == False (if not already set that way).

    If it _still_ doesn't debug for you, then consider creating a new Project using the .NET Wizard, and copy in the code I posted as your only .CS file (delete MyPlugins.cs, and MyCommands.cs files), check these settings, and attempt a debug... If that works, then I've overlooked something, and you can then begin to revise the code that debugs successfully.

    Cheers



    [Edit] -
    Dove in Italia abiti? Nonna di mia bella moglie (mia Nonna), in realtà vive in un piccolo paese alle porte di Venezia.

    Ciao
    "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. #25
    Active Member
    Join Date
    2012-11
    Location
    Italy
    Posts
    65
    Login to Give a bone
    0

    Default Re: Drawing a line in model space

    Hi BB
    By now I'm off my NET holidays!
    Anyhow yesterday at home I tried removing COM references (what a tough man am I) but still with no results. I don't instantiate any COM class for what I'm aware of and I have all copy locals set to false. When back home I'll try the new project way as per your advice.

    Here at work I can use a VSExpress2010 and still Autoad 2010. I tried and debug another project and it works!
    The only weird thing with my office environment is that "netload" command takes many minutes (yes minutes) to run. this, both in and out of a debugging session. I attach the "output" log: does this ring any bell to you?


    PS: I'm form Parma. not so far from Venice, from an "overseas" point of view.

    PS: I like Google translator in that it's the only one who can write english worse then I do!
    Attached Files Attached Files

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

    Default Re: Drawing a line in model space

    No worries; hopefully someone smarter than I will be able to help us identify what is causing the debug issue.

    I've only ever worked with a single version of VS at a time, meaning if I used VS 2013 Ultimate at the office, I used the same at home (now testing 2015 preview).

    Separately, if you'd like to get ahead with .NET, you might also consider applying for a Microsoft BizSpark membership; the free MSDN Ultimate subscription has been invaluable.

    Cheers



    PS: Google Translate non può essere perfetto, colloquiale, ma è molto utile. Meglio provare a parlare la lingua di qualcun altro, piuttosto che assumere si parla la tua lingua, giusto?! eheheh ciao
    "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

  7. #27
    Active Member
    Join Date
    2012-11
    Location
    Italy
    Posts
    65
    Login to Give a bone
    0

    Default Re: Drawing a line in model space

    no good news
    Started anew with Net Wizards, unchecking the "reference COM" checkbox (can't recall the exact text but that was the subject). I checked all project settings as per your advice and launched debug, Autocad started (same old delay with respect to a "normal" start), loaded a dwg file, run netload and choose my dll. then run the command but no berakpoints observed.

    I can add what follows:
    - I erased all .cs files (whose names were not the ones you listed: one of them was about "command" subject actually while the other was "MyPlugin.cs") so that only Command.cs left
    - there remained also an acad.lsp and a .txt
    - at drawing loading, I was asked to choose whether to load acad.lsp only or another .lsp too (whose name I can't now recall). I chose to load acad.lsp only.

    hope that could help you helping me out!

    if not I'll try in some other forums too (I know in some of them you'll read me again)

    thanks for all your efforts supporting me

    Separately: I had a look at Microsoft BizSpark web page but there I could understand it was for not for "standalone" and not professional developers.

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

    Default Re: Drawing a line in model space

    Silly question... What .NET Framework are you targeting?

    In VS 2013 this is located in Project Properties, Application tab, Target framework dropdown.



    [Edit] - For 2010, you should be compiling to .NET 3.5 Framework, and using 2010 ObjectARX SDK for references to AcDbMgd.dll, and AcMgd.dll assemblies.
    "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

  9. #29
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    "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

  10. #30
    Active Member
    Join Date
    2012-11
    Location
    Italy
    Posts
    65
    Login to Give a bone
    0

    Default Re: Drawing a line in model space

    Should I ever be able to judge question over NET subject, I'd highly prefer a maybe silly question more to maybe solve a problem than a clever question less.
    but all that comes after my huge appreciation of a help in hand
    so thank you again for your support

    so yes, I'm targeting NET 3.5

    as for 2010 ObjectARX SDK I'd also answer "yes". the conditional is due to installing 2010 ObjectARX and then trying to unsuccessfully install 2010 ARX Wizards. Till I downloaded a "magic" file they told was able for both 2010 and 2012 versions.
    So now I'm wondering if this "magic" installation could have altered ObjectARX AcDbMgd.dll and AcMgd.dll assemblies which I reference (though they reside in "..\ObjectARX 2010\inc-x64" folder). How could I make sure of that? (but please don't answer to reinstall something. it's been a long and actually magic thing I came to make Autocad, VS and ObjectARX work together for at least generate some usable dlls!)

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Model Documentation - Allow editing of line weights in drawing views
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2016-10-25, 04:37 PM
  2. 2006: drawing scale model space
    By caduser50R in forum ACA General
    Replies: 6
    Last Post: 2014-11-07, 06:15 PM
  3. Replies: 0
    Last Post: 2011-10-21, 06:44 PM
  4. Drawing not visible in model space
    By hardygiant in forum AutoCAD General
    Replies: 28
    Last Post: 2011-04-01, 12:35 AM
  5. Connot see hidden line in Model space
    By Jack Cheong in forum AutoCAD General
    Replies: 4
    Last Post: 2007-10-19, 02:25 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
  •