Home > Software engineering >  How to use vb code connection reference libraries of TLB file
How to use vb code connection reference libraries of TLB file

Time:09-21


As shown in figure, the TLB file reference libraries how to connect with code?
Could have been caused by solidworks software versions to write their own vb program cannot be used, but only to find the reference libraries points to file its file name does not change with solidworks version of the program, so on this question, also please expert to solve!

CodePudding user response:

Before and after the contrast reference corresponding VBP file is different,

CodePudding user response:

"Demand" like you, I can use another thing analogy,

Android smartphones "system" has been destroyed, cannot be started after boot into the system;
Can through the USB cable to connect through computer software, to "flash" repair,
But the problem here:
1. Almost all of the flash software, is to open the "USB debugging mode", to connect properly, brush into the ROM,
2. The android smart phone system, "USB debugging mode" is "closed" state by default, to set the "open" in the system, enter the system to open,

Flash software requirements "open" USB debugging mode can brush system; And mobile phone unable to enter the system, USB debug mode is "closed",
You say, how to solve this contradiction?


And your question is:
TLB reference is "engineering opens" regarding the need to set up the corresponding Settings;
You want to execute code ", "change the TLB reference, but your code is not implemented,

In fact, even if the code can perform, nor may be referenced by code change TLB,

CodePudding user response:

Give you mean way:

The first step: "solidworks" related reference library () in your current project,
Write the code, but all the objects associated with "solidworks", cannot use New, want to use CreateObject create,

Step 2: in reference to make the "solidworks" related TLB reference all take out, all the "Object" in related to the Object types,

CodePudding user response:

refer to the second floor Chen8013 response:
"demand" like you, can I use another thing analogy,

Android smartphones "system" has been destroyed, cannot be started after boot into the system;
Can through the USB cable to connect through computer software, to "flash" repair,
But the problem here:
1. Almost all of the flash software, is to open the "USB debugging mode", to connect properly, brush into the ROM,
2. The android smart phone system, "USB debugging mode" is "closed" state by default, to set the "open" in the system, enter the system to open,

Flash software requirements "open" USB debugging mode can brush system; And mobile phone unable to enter the system, USB debug mode is "closed",
You say, how to solve this contradiction?


And your question is:
TLB reference is "engineering opens" regarding the need to set up the corresponding Settings;
You want to execute code ", "change the TLB reference, but your code is not implemented,

In fact: even if the code can perform, nor may be referenced by code change TLB,

CodePudding user response:

The
reference 3 floor Chen8013 response:
refers to the way to you:

The first step: "solidworks" related reference library () in your current project,
Write the code, but all the objects associated with "solidworks", cannot use New, want to use CreateObject create,

Step 2: in reference to make the "solidworks" related TLB reference all take out, all the "Object" in related to the Object types,

Add again after the view or change the software version of its reference libraries to be a little bit more simple: all the class object (statement into object let me use very headache!)
  •  Tags:  
  • VBA
  • Related