Hello everyone,
Basically a macro for the subject says. I searched the forum library but could not find something similar.
I have Custom Properties setup which is great but it does not work in drawings environment .
This forces me to switch back & forth a lot when I want to change properties of a component; say description, finishing note, etc.
Ideally precondition would be to pre-select an entity of the component from graphics view (for both assembly & drawings).
It'd be nice if you can select the component from BOM in drawing environment and the macro still works.
Thank you in advance!
Vahid
Access to Component "File Properties" Through Assembly & Drawing Without Opening the Component
Re: Access to Component "File Properties" Through Assembly & Drawing Without Opening the Component
This example shows how to get a component within the drawing view. You could also explicitly select it and use the GetSelectedObject functionality and cast the current selection as needed.
https://help.solidworks.com/2018/englis ... ple_vb.htm
From there, you can use the Component2::GetModelDoc2() function to get the pointer to that component's model. You should be able to get the custom property manager from there similar to your current macro.
https://help.solidworks.com/2018/englis ... ple_vb.htm
From there, you can use the Component2::GetModelDoc2() function to get the pointer to that component's model. You should be able to get the custom property manager from there similar to your current macro.
-
- Posts: 19
- Joined: Wed Feb 01, 2023 5:10 pm
- x 1
Re: Access to Component "File Properties" Through Assembly & Drawing Without Opening the Component
Came to second that this would also be useful for me! Let me know if you come across something that works, please.Slasher wrote: ↑Tue Mar 05, 2024 10:39 am Hello everyone,
Basically a macro for the subject says. I searched the forum library but could not find something similar.
I have Custom Properties setup which is great but it does not work in drawings environment .
This forces me to switch back & forth a lot when I want to change properties of a component; say description, finishing note, etc.
Ideally precondition would be to pre-select an entity of the component from graphics view (for both assembly & drawings).
It'd be nice if you can select the component from BOM in drawing environment and the macro still works.
Thank you in advance!
Vahid