also interesting is, after your statement
"...you can't use acmdg.dll or acdbmgd.dll, because"
and before your last answer,...
i deleted the reference to acdbmgd.dll - and the code still compiles
so apparently i'm not using that one.
if i delete acMgd, i get an error on:
_
so apparently that one is required.
I want to migrate my code and thinking to the net api asap but for now have
pressing time deadlines and lots of other duties beyond coding so an going
with the com that is more familiar.
thanks
Mark
"Tony Tanzillo" wrote in message
news:6369785@discussion.autodesk.com...
Yes, NETLOAD loads a dll into AutoCAD's process.
So does demand-loading via the registry.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
"mp" wrote in message
news:6369723@discussion.autodesk.com...
thanks, I'll have to go do some research on that.
I thought i'd read somewhere that netload was loading into acad's process.
mark
"Tony Tanzillo" wrote in message
news:6369601@discussion.autodesk.com...
It's not how a DLL is loaded that matters. It's whether a
DLL is loaded into AutoCAD's process or not. If it is not,
then you can't use acmdg.dll or acdbmgd.dll, because
those DLLs can only be used from code that's running in
AutoCAD's process.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
"mp" wrote in message
news:6369569@discussion.autodesk.com...
Thank you much.
As i mentioned, i've just been copying previous examples.
Now that i think about it, this sample came from a dll we have here that is
(i think the term is demand loaded?) via a registry entry...
Since i'm just starting to learn net, i went the netload way for this
initial debugging phase and havent' learned the ins and outs of loading via
registry....
so that must be why the GetObject call is there...
so is that correct, if a dll is loaded via registry, does that mean it's a
"standalone exe" ,,. even tho it's a dll not an exe as in vb6?
:-)
Appreciate the lessons!
Mark
"Tony Tanzillo" wrote in message
news:6369257@discussion.autodesk.com...
You never use GetObject() to get the AcadApplication when
your code is NETLOADed.
You use:
acadApp =
Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
And you don't need to call ReleaseComObject()
or doing anything else.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
"mp" wrote in message
news:6369148@discussion.autodesk.com...
I'll have to do some reading on those two. This creates a dll that gets
loaded with netload.
not sure what that makes it.(the create acad was in the sample code i used
to convert to my app)
just working from existing code and adapting to learn dotnet(along with some
online course and websearches ngs etc)
so, yes, i'm probably making a complet mess of it.
:-)
thanks
mark
"Tony Tanzillo" wrote in message
news:6368911@discussion.autodesk.com...
You didn't mention if this is an AutoCAD extension or
a standalone executable. If its the former, then you don't
use GetObject() to get the AutoCAD application.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
"mp" wrote in message
news:6368905@discussion.autodesk.com...
"Tony Tanzillo" wrote in message
news:6368884@discussion.autodesk.com...
No one can guess why that's happening and you're not
providing very much information about your app or what
it does.
true, i was just guessing it was a general issue that may have been a common
occurance,.
the app gets an instance of acad, prompts to select an arc, presents a
couple inputboxes for user input, calculates some double values, creates
some lines, adds the lines to an array, adds the array to a selection set,
and tries to wblock the selection set to a new file - which i then will try
to convert to a dxf file.
the get acad is:
Private Function GetAutoCADInstance() As AcadApplication
Dim m_AcadApp As AcadApplication = Nothing
Try
'get currently running Autocad object if available
m_AcadApp = TryCast(GetObject(, "AutoCAD.Application"),
AcadApplication)
Catch ex As Exception
m_AcadApp = Nothing
End Try
Return m_AcadApp
End Function
if the app crashes, (due to me being stupid and working out bugs) is when
acad is left in the process
- now the last few times that happened it's actually closing when i tell it
to close.
the line that was creating the crash I found was calling
SelectionSet.AddItems (object) wrong.
I was passsing an object, not an array of objects
since i fixed that, the hanging process problem seems to have gone away.
even though the .AddItems was in a try catch loop it apparently didn't help
wtih that error.
thanks
mark