Tharwat Posted June 23, 2011 Share Posted June 23, 2011 Hello everyone . I wonder how to get the properties of Layers, Layouts , Dimension Style and document etc .... ........ which are not being available to be selected by the use of function *vlax-dump-object* or any other function . My intention is to get the properties and methods that are available for such a things. Thanks a lot . Tharwat Quote Link to comment Share on other sites More sharing options...
BlackBox Posted June 23, 2011 Share Posted June 23, 2011 (edited) [edit] I'm kind of surprised that you even posed this question. In any event... [/edit] This works for any valid VLA-OBJECT: (defun DUMP (arg) (if (= 'VLA-OBJECT (type arg)) (progn (textpage) (vlax-dump-object arg T)) (prompt "\n** Invalid argument ** ")) (princ)) However, here's are some examples of Layer specific DUMP routines from my toolbox: (defun c:DUMPLAY (/ layerName) (if (and (setq layerName (getstring "\nEnter layer name: ")) (tblsearch "layer" layerName)) (DUMPLAY layerName) (prompt "\n** Layer does not exist ** ")) (princ)) (defun DUMPLAY (layerName) (if (tblsearch "layer" layerName) (progn (textpage) (vlax-dump-object (vla-item (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) layerName) T)) (prompt "\n** Layer does not exist ** ")) (princ)) Edited June 23, 2011 by BlackBox Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 23, 2011 Share Posted June 23, 2011 As Renderman correctly states, vlax-dump-object will work with any VLA-Object, whether such VLA-Object is part of the AutoCAD Object Model or otherwise. For investigating objects within the hierarchy of the AutoCAD Object Model, I sometimes find it easier to use the Object Model flowchart in the ActiveX Developer Reference. To access this, in the VLIDE Help Documentation, navigate to: ActiveX and VBA Reference » Object Model From here you can click on any object listed on the Object Model flowchart to see the properties/methods pertaining to that object, and furthermore you can quickly navigate to the documentation for each property/method. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted June 23, 2011 Share Posted June 23, 2011 Lee - You'd laugh, I've even gone into VBAIDE / Visual Studio to peruse the Object Viewer if I couldn't find what I was looking for. LoL Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 23, 2011 Author Share Posted June 23, 2011 [edit]I'm kind of surprised that you even posed this question. In any event... [/edit] Thanks for the codes , they are very helpful . ًWhy you are surprised dear Renderman ? Thanks a lot . Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 23, 2011 Share Posted June 23, 2011 Lee - You'd laugh, I've even gone into VBAIDE / Visual Studio to peruse the Object Viewer if I couldn't find what I was looking for. LoL Well, the VS Object Browser would probably be best for objects outside of the AutoCAD Object Model, so you're not going too far wrong Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 23, 2011 Author Share Posted June 23, 2011 To access this, in the VLIDE Help Documentation, navigate to: ActiveX and VBA Reference » Object Model . That's what I knew but did not know how to get Vla-object of it to extract its Props and Methods as well . And what about dims and groups and viewports etc...... Thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 23, 2011 Share Posted June 23, 2011 That's what I knew but did not know how to get Vla-object of it to extract its Props and Methods as well . Click on the item on the chart. And what about dims and groups and viewports etc...... Every object in the model is listed. Quote Link to comment Share on other sites More sharing options...
irneb Posted June 24, 2011 Share Posted June 24, 2011 If I'm totally off topic then I apologize. But I've had a similar "problem" previously. Tim Willey put me onto the TblInf32.DLL file. You'll need to load it through the vlax-import-type-library function and then you can see what's in it by downloading this help file: http://support.microsoft.com/kb/q224331/ That way you're able to get all the properties / methods into a list so you can place them (say) in a dialog box. That's actually what the Object Browser in VBA itself uses. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 24, 2011 Share Posted June 24, 2011 If I'm totally off topic then I apologize. But I've had a similar "problem" previously. Tim Willey put me onto the TblInf32.DLL file. Running with that theme, this is a very interesting investigation into the Properties and Methods of the tool used to expose the Properties and Methods of other objects (TlbInf32.dll). As Michael states in that thread, it does have a sense of beauty in recursiveness of the statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.