insert virtual part

Programming and macros
User avatar
mp3-250
Posts: 535
Joined: Tue Sep 28, 2021 4:09 am
Answers: 18
Location: Japan
x 595
x 274

insert virtual part

Unread post by mp3-250 »

I am lookIng for a FAST way to insert a virtual component based on a specific template (different from our standard one in the default template setting) inside an assembly, making origins coincident and locking it in position.

the operation is quite simple, but even without checks, error handling etc it takes about 1.5-1.7 seconds at the moment (there is probably a certain level of pdm overhead) and for dozen of components it feels extremely slow.
User avatar
zwei
Posts: 700
Joined: Mon Mar 15, 2021 9:17 pm
Answers: 18
Location: Malaysia
x 185
x 597

Re: insert virtual part

Unread post by zwei »

mp3-250 wrote: Mon Apr 17, 2023 6:21 pm I am lookIng for a FAST way to insert a virtual component based on a specific template (different from our standard one in the default template setting) inside an assembly, making origins coincident and locking it in position.

the operation is quite simple, but even without checks, error handling etc it takes about 1.5-1.7 seconds at the moment (there is probably a certain level of pdm overhead) and for dozen of components it feels extremely slow.
I am abit confuse with your question

Are you looking for a macro that insert the virtual component?

Or

Are you looking for ways to speed up the macro?
Far too many items in the world are designed, constructed and foisted upon us with no understanding-or even care-for how we will use them.
User avatar
mp3-250
Posts: 535
Joined: Tue Sep 28, 2021 4:09 am
Answers: 18
Location: Japan
x 595
x 274

Re: insert virtual part

Unread post by mp3-250 »

ways to speed up the macro.
I tried the hints on cadbooster and disabled on screen and tree refresh, but the macro total running time does not improve apparently.
User avatar
gupta9665
Posts: 359
Joined: Thu Mar 11, 2021 10:20 am
Answers: 20
Location: India
x 383
x 414

Re: insert virtual part

Unread post by gupta9665 »

If you want to insert multiple virtual components, then why not insert them in batch.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
Post Reply