Page 1 of 1

Can I load and run a vbi file without open the dwg file?

Posted: Wed Oct 16, 2024 11:59 am
by verdant
Hi everyone:
I'm new in intellicad, I tried to write some VBA code and saved,
then it bring me 2 files, a .dwg file and a .vbi file,
I tried to load the .vbi file alone and run it,
then the programe crashed.
I need to open the .dwg file and programe will load the .vbi file automatically,
then I can safely run the VBA macro without crashing.
So I want to know..
(1) is runing .vbi file alone disabled? or is there something wrong I made?
(2) is there any way to run .vbi file alone

sorry for my poor English again and thanks

Re: Can I load and run a vbi file without open the dwg file?

Posted: Thu Oct 17, 2024 7:25 pm
by QuanNguyen
verdant wrote:
Wed Oct 16, 2024 11:59 am
Hi everyone:
I'm new in intellicad, I tried to write some VBA code and saved,
then it bring me 2 files, a .dwg file and a .vbi file,
I tried to load the .vbi file alone and run it,
then the programe crashed.
I need to open the .dwg file and programe will load the .vbi file automatically,
then I can safely run the VBA macro without crashing.
So I want to know..
(1) is runing .vbi file alone disabled? or is there something wrong I made?
(2) is there any way to run .vbi file alone

sorry for my poor English again and thanks
Hi Verdant,
Sure, we can run any separate vbi file in the CMS IntelliCAD.
Maybe the problem is in your code, please attach your vbi file here, so everybody can find the issues.
Regards,

Re: Can I load and run a vbi file without open the dwg file?

Posted: Thu Oct 17, 2024 8:17 pm
by verdant
QuanNguyen wrote:
Thu Oct 17, 2024 7:25 pm
verdant wrote:
Wed Oct 16, 2024 11:59 am
Hi everyone:
I'm new in intellicad, I tried to write some VBA code and saved,
then it bring me 2 files, a .dwg file and a .vbi file,
I tried to load the .vbi file alone and run it,
then the programe crashed.
I need to open the .dwg file and programe will load the .vbi file automatically,
then I can safely run the VBA macro without crashing.
So I want to know..
(1) is runing .vbi file alone disabled? or is there something wrong I made?
(2) is there any way to run .vbi file alone

sorry for my poor English again and thanks
Hi Verdant,
Sure, we can run any separate vbi file in the CMS IntelliCAD.
Maybe the problem is in your code, please attach your vbi file here, so everybody can find the issues.
Regards,
Thank you!
I tried again and the programe still crashed (when running userform).
I just put file URL here

.vbi https://www.dropbox.com/scl/fi/9ksnslrb ... znsuq&dl=0
.dwghttps://www.dropbox.com/scl/fi/faxt161e ... hsmt8&dl=0

Re: Can I load and run a vbi file without open the dwg file?

Posted: Thu Oct 17, 2024 9:18 pm
by QuanNguyen
Please replace all the ThisDocument with ActiveDocument .
Then it works (without open dwg file).

Refer to: viewtopic.php?p=10789&sid=931ece189e5a6 ... 2b8#p10789

Re: Can I load and run a vbi file without open the dwg file?

Posted: Fri Oct 18, 2024 7:37 pm
by verdant
QuanNguyen wrote:
Thu Oct 17, 2024 9:18 pm
Please replace all the ThisDocument with ActiveDocument .
Then it works (without open dwg file).

Refer to: viewtopic.php?p=10789&sid=931ece189e5a6 ... 2b8#p10789
It really works! thank you QuanNguyen