OPM with block attributes

OPM with block attributes

Anonymous
Not applicable
387 Views
4 Replies
Message 1 of 5

OPM with block attributes

Anonymous
Not applicable
Hy,

I made an OPM extension to show block attributes in Property Manager.
Also they are all string - no other type available - it shows the correct
values.
BUT! When I try to update changed values to the Attr, the opening had an
error message
eLockViolation?
Why is it locked when OPM running?
How can I update string values from OPM dialog to a block attribute?

cheers,
Zoltan
0 Likes
388 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Use
acDocManager->lockDocument(acDocManager->document(BlockDefId.database()),
AcAp::kAutoWrite);
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hy,

Thank, it is working!

My next problem with the COM strings:
how can I convert from:
VT_BSTR(&varData)
to:
const char* for
Acad::ErrorStatus setTextString(const char* newText);

cheers,
Zoltan

"Alexander" az alábbiakat írta a következo üzenetben:
news:554CDBBE1994393E4F906D83174FB10B@in.WebX.maYIadrTaRb...
> Use
> acDocManager->lockDocument(acDocManager->document(BlockDefId.database()),
> AcAp::kAutoWrite);
>
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
Hi,

You can use _bstr_t.

Bogdan

"Zoltan" <2002zoli@freestart.hu> wrote in message
news:7B363B7CB575AFE44B8F3A7872803127@in.WebX.maYIadrTaRb...
> Hy,
>
> Thank, it is working!
>
> My next problem with the COM strings:
> how can I convert from:
> VT_BSTR(&varData)
> to:
> const char* for
> Acad::ErrorStatus setTextString(const char* newText);
>
> cheers,
> Zoltan
>
> "Alexander" az alábbiakat írta a következo üzenetben:
> news:554CDBBE1994393E4F906D83174FB10B@in.WebX.maYIadrTaRb...
> > Use
> >
acDocManager->lockDocument(acDocManager->document(BlockDefId.database()),
> > AcAp::kAutoWrite);
> >
> >
>
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
Hy,

Yes I found it
This is the final sulution:
_bstr_t bstMyBSTR = (BSTR)varData.bstrVal;
pAttr->setTextString((const char*)(bstMyBSTR));

Cheers,
Zoltan

"Bogdan" az alábbiakat írta a következo üzenetben:
news:1F03AE516EEDAC1119E0163E5E8E8CCE@in.WebX.maYIadrTaRb...
> Hi,
>
> You can use _bstr_t.
>
> Bogdan
>
> "Zoltan" <2002zoli@freestart.hu> wrote in message
> news:7B363B7CB575AFE44B8F3A7872803127@in.WebX.maYIadrTaRb...
> > Hy,
> >
> > Thank, it is working!
> >
> > My next problem with the COM strings:
> > how can I convert from:
> > VT_BSTR(&varData)
> > to:
> > const char* for
> > Acad::ErrorStatus setTextString(const char* newText);
> >
> > cheers,
> > Zoltan
> >
> > "Alexander" az alábbiakat írta a következo üzenetben:
> > news:554CDBBE1994393E4F906D83174FB10B@in.WebX.maYIadrTaRb...
> > > Use
> > >
> acDocManager->lockDocument(acDocManager->document(BlockDefId.database()),
> > > AcAp::kAutoWrite);
> > >
> > >
> >
> >
>
>
0 Likes