Accessing Datas from another DWG file
Bonjour,
In context of a layers management ptoject, we need to get access from a working file to the layers part of the datas of a Layers-Template file (i.e. another dwg file).
Googling on the web lets me the impression it is not that easy.At least without VisualLisp.
Does someone have a solution for this:
- while working on a file A.dwg
-accessing / ( loading?) the template file B.dwg , but preferably not displaying it in Bricscad's GUI; access in readmode
- instanciate an Autolisp object (dictionary object I guess) as the drawing datatable
- and retrieve the attributes table of the layers of this fileB.dwg
- the same in write-access ifpossible
Thanks on forward
Comments
-
Bonjour,
I got through some steps with AutoLisp, and I'm back with this issue (on whicjh I didn't get answer following my IssueEdit):
accessing another DWG file (resource file) from a working one.
1. As preliminary, where can I find good documentation on VLA, VLAX and other VisualLisp (supported by Bricscad)?
(The Help of V10 is only a list of the functions, for the while; I do not have an Autdesk package installed, and the main tutorials on VisualLisp are succinct on this
2. Up to now, my best attempt for opening a DWG file happened in VisualLisp. The receipts from the earlier quoted forums didn't lead me to success up to now. Should I stick to plain Autolisp, for simplicity? for performance?...
3. I need to access to the Layers table of this resource file, but without interference with the screen: this resource file should be 'hidden' from the GUI if this is possible.
4. Read access is most often enough, but if the solutions allows editing layer-attributes, it is better
Can someone give me some step on this way?
In AutoLisp? VisualLisp?
Thanks on forward0 -
Here you can find some help on VL* functions
0 -
I have not found such a list for the functions nor for the properites supported. The most likely reason there is not a definitive list of supported VL* lisp functionality is that is has been growing rapidly. Such a document would probably be a maintenance nightmare.
My approach has been to create a test for the functions I want to use and see what works. Generally most of the VisualLisp functionality I use is supported. If there is something important you find missing you can ask via a support request. They will tell you if the feature has been scheduled for implementation and what the time frame for the implementation is.
Have fun...
0 -
Back again... had to handle something else for a moment :-)
As for the rest of your question I have never tried to do anythin like that so I can't say how to do it. If the VLisp functions do not work for this VBA might. There are some on this list that know the VBA stuff pretty well.
If nothing else seems to work perhaps you can XREF the layer template and query the layers from the XREF then detach the XREF... just a thought.
0 -
Thanks, Greg,
for functions xupport, OK, I'll see.
But I'm newbie in VisualLisp: Where canI find good documentation (without autodesk package)?
Thanks on forward
0 -
See the link Roy posted for a reference document.
You can search for visual lisp tutorial with google and find hits.
There is the Visual Lisp Bible by David Stein now found here http://sites.google.com/site/skatterbrainz/vldb
afralisp.net
theswamp.org
cadtutor.net
and the Autocad lisp discussion groups.
There are several other web resources for other languages but I am unfamiliar with them.
0 -
Thanks to Roy and Greg.
The Visual Lisp Bible is wat I was missing.
yours,
PY Delens
0 -
I think ObjectDBX is still yet to be implemented, at least it was that way last time I tried. Currently the only way I know to access a DWG file is with BRX. I.e
0 -
oops : ) no I.e
0 -
Thank youn, Daniel,
I introduced a support Request about this ObjectDBX : "Is it featurd or not?"
Thanks
PY D
0