Hi,
sorry to say, you landed in the wrong forum, here is not Mechanical and here is also not VBA handled.
Maybe you have more luck using that forums:
>>>Visual Basic Customization<<<
Good luck, - alfred -
Hi,
Please post in the right forum next time ; Below is code that you were looking for.
' get mechanical application object
Dim acmApp As AcadmApplication
Set acmApp = ThisDrawing.Application.GetInterfaceObject("AcadmAuto.AcadmApplication")
' get the 2D structure manager object
Dim acmStrMgr As Mcad2DStructureMgr
Set acmStrMgr = acmApp.ActiveDocument.StructureMgr2D
' get all component definitions
Dim acmCompDefs As McadComponentDefinitions
Call acmStrMgr.GetComponentDefinitions(acmCompDefs, False)
' create a folder descriptor
Dim acmFoldDesc As McadFolderDescriptor
Set acmFoldDesc = acmStrMgr.CreateFolderDescriptor
' set it to the folder descriptor
acmFoldDesc.Name = acmCompDefs(0).ComponentViewDefinitions(0).Name
acmFoldDesc.Definition = acmCompDefs(0).ComponentViewDefinitions(0)
' assign it to the preview component
Mcad2DSPreview1.Descriptor = acmFoldDesc
Thank you very much for not making me to wait more time for solution.
I might have lost some more time by moving this query to the relevent forum.
I apprciate your time and help.
Great!
I wish I could be able to give you more Kudos ...!!