VBA Attach Reference File - Choose Orientation?

To all the VBA / MDL gods out there ...

Is there a chance to attach a reference file and define the orientation (p.ex. "front", "back", "left") as shown below?

I was not able to find a way to touch this setting so far ...

Parents
  • Unknown said:
    Is there a chance to attach a reference file and define the orientation

    References and Attachments

    Reference models are termed Attachment in VBA.  Attach a model as a reference like this...

    Dim oReference As Attachment
    Set oReference = ActiveModelReference.Attachments.Add (FileSpecification, ModelName, LogicalName, Description, MasterOrigin, ReferenceOrigin [, TrueScale [, DisplayImmediately]])

    You can see that there's no parameter to specify orientation, so you must use the methods of the new attachment.  Use Attachment.Rotate to specify a rotation, then Attachment.Rewrite to make it permanent.

    Orientation and Rotation

    What is presented to the user as orientation is, in VBA terms, a view rotation where the view is one of the standard viewsAttachment.Rotate rotates an attachment relative to a view rotation.  From VBA help...

    Attachment.Rotate rotates the Attachment about the View's axes, not the model's axes. Use ViewSpecifier to select the view.

    If the Attachment is clipped by an element, the clip element is rotated and immediately written to the file. In that case, the Attachment should always be written to the file to keep it in synch with its clipping element

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: quasi_modo 

Reply
  • Unknown said:
    Is there a chance to attach a reference file and define the orientation

    References and Attachments

    Reference models are termed Attachment in VBA.  Attach a model as a reference like this...

    Dim oReference As Attachment
    Set oReference = ActiveModelReference.Attachments.Add (FileSpecification, ModelName, LogicalName, Description, MasterOrigin, ReferenceOrigin [, TrueScale [, DisplayImmediately]])

    You can see that there's no parameter to specify orientation, so you must use the methods of the new attachment.  Use Attachment.Rotate to specify a rotation, then Attachment.Rewrite to make it permanent.

    Orientation and Rotation

    What is presented to the user as orientation is, in VBA terms, a view rotation where the view is one of the standard viewsAttachment.Rotate rotates an attachment relative to a view rotation.  From VBA help...

    Attachment.Rotate rotates the Attachment about the View's axes, not the model's axes. Use ViewSpecifier to select the view.

    If the Attachment is clipped by an element, the clip element is rotated and immediately written to the file. In that case, the Attachment should always be written to the file to keep it in synch with its clipping element

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: quasi_modo 

Children