Xdata for element in OpenDesignFileForProgram

Fellow Microstation VBA users,

I neeed some basic code to add/modify Xdata for an element, in a cell, in a design file, opened with OpenDesignFileForProgram.  I'm uncertain how to do this.  My guess would be to utilize the Appplication.ObjectConnector or the mdlModelRef_loadReferenceModels?

Thanks in advance,

Christmas May

Parents
  • Christmas050873 said:
    My guess would be to utilize the Appplication.ObjectConnector or the mdlModelRef_loadReferenceModels?

    Your question makes it hard to interpret what you want to do.

    Mention of the Application.ObjectConnector implies that you're writing VB/VBA code running outside MicroStation.

    Mention of mdlModelRef_loadReferenceModels suggests that you want to write MDL code running inside MicroStation.

    From your subsequent post it looks like you are writing VBA code to run inside MicroStation. Please clarify …

    1. Does your code run in MicroStation or some other product? If your code runs in MicroStation you don't need to use the Application.ObjectConnector — you're already connected to MicroStation
    2. Why would mdlModelRef_loadReferenceModels help with your goal of creating or modifying XData?

    Christmas050873 said:
    It doesn't work when run via "Batch Process"

    Please explain what you mean by "Batch Process".

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Reply
  • Christmas050873 said:
    My guess would be to utilize the Appplication.ObjectConnector or the mdlModelRef_loadReferenceModels?

    Your question makes it hard to interpret what you want to do.

    Mention of the Application.ObjectConnector implies that you're writing VB/VBA code running outside MicroStation.

    Mention of mdlModelRef_loadReferenceModels suggests that you want to write MDL code running inside MicroStation.

    From your subsequent post it looks like you are writing VBA code to run inside MicroStation. Please clarify …

    1. Does your code run in MicroStation or some other product? If your code runs in MicroStation you don't need to use the Application.ObjectConnector — you're already connected to MicroStation
    2. Why would mdlModelRef_loadReferenceModels help with your goal of creating or modifying XData?

    Christmas050873 said:
    It doesn't work when run via "Batch Process"

    Please explain what you mean by "Batch Process".

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

Children