Hi there, is there a way to achieve the above, via vba programming?
If so, could you please provide an example?
Thanks in advance.
Solved! Go to Solution.
Hi there, is there a way to achieve the above, via vba programming?
If so, could you please provide an example?
Thanks in advance.
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
When you say "...connection to shape..." do you mean to connect shape file as FDO data source, as you do manually through AutoCAD Map's "Task Pane -> Display Manager -> Data"? If so, no, there is no COM/VBA support to connect AutoCAD Map to shape (or other FDO source, for taht matter).
If you want to get shape data (or other FDO source) into AutoCAD Map as map layer(s) programmatically, you need to learn AutoCAD Map geospatial platform APIs (.NET API).
Norman Yuan
When you say "...connection to shape..." do you mean to connect shape file as FDO data source, as you do manually through AutoCAD Map's "Task Pane -> Display Manager -> Data"? If so, no, there is no COM/VBA support to connect AutoCAD Map to shape (or other FDO source, for taht matter).
If you want to get shape data (or other FDO source) into AutoCAD Map as map layer(s) programmatically, you need to learn AutoCAD Map geospatial platform APIs (.NET API).
Norman Yuan
Thanks for your answer, yes, that was I meant.
I'm not able to have visual studio installed in my machine, but what I would like at the end may be fairly simple, I just wanted a way, say a ribbon button, to quickly bring the data from some recurring sources we have.
I thought about even to try the 'sendcommand' vba function, but database connection doesn't seem to have a transparent command version.
Well, could you after all point me out for some solution?
Thanks again,
Alan
Thanks for your answer, yes, that was I meant.
I'm not able to have visual studio installed in my machine, but what I would like at the end may be fairly simple, I just wanted a way, say a ribbon button, to quickly bring the data from some recurring sources we have.
I thought about even to try the 'sendcommand' vba function, but database connection doesn't seem to have a transparent command version.
Well, could you after all point me out for some solution?
Thanks again,
Alan
Considering the quite complicated, multiple steps of using Display Manager to connect FDO data source, I doubt it is possible to either create an AutoCAD script macro, or using VBA's "SendCommand" to complete the whole manual process. At least I never tried, or thought to try.
Also, as my previous reply said, there is no VBA support for AutoCAD Map FDO connection. While manaully connect to shape file can be as simple as dragging the shape files into AutoCAD Map, after the draggng, user liely needs to reconfigure the map layers as reqiured. This only way to programmatically connect to shape data as map layers is to use geospatial platform API, which the code can control the connecting process precisely as you want: where the source shapes are, how the map layer is defined, which geometries in the shape are to be shown in the map drawing...
Norman Yuan
Considering the quite complicated, multiple steps of using Display Manager to connect FDO data source, I doubt it is possible to either create an AutoCAD script macro, or using VBA's "SendCommand" to complete the whole manual process. At least I never tried, or thought to try.
Also, as my previous reply said, there is no VBA support for AutoCAD Map FDO connection. While manaully connect to shape file can be as simple as dragging the shape files into AutoCAD Map, after the draggng, user liely needs to reconfigure the map layers as reqiured. This only way to programmatically connect to shape data as map layers is to use geospatial platform API, which the code can control the connecting process precisely as you want: where the source shapes are, how the map layer is defined, which geometries in the shape are to be shown in the map drawing...
Norman Yuan
Can't find what you're looking for? Ask the community or share your knowledge.