Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing image heigh with journal?

Status
Not open for further replies.

aluminum2

Aerospace
Apr 27, 2010
218

I am trying to resize an image I am inserting with a journal. The image part works. I added code to resize it and when I run it I get an error saying it is converting string to integer . I am not sure If I am using the SetImageWidth and SetImageheight correctly.




Code:
             Dim imageFile As String = "location" 
             Dim sheetTag As Tag = NXOpen.Tag.Null  
             Dim imageCoordinates(2) As Double  
             Dim imageheight As Double
             Dim imageWidth As Double
             imageCoordinates(0) = NAMEX  
             imageCoordinates(1) = NAMEY  
             imageCoordinates(2) = 0  
             imageheight = .1000
             imageWidth = .2000
             Dim imageTag As Tag = NXOpen.Tag.Null  
             ufs.Drf.CreateImageFromFile(imageFile, sheetTag, imageCoordinates, imageTag)  
             ufs.Drf.SetImageHeight(imageFile, imageheight)
             ufs.Drf.SetImageWidth(imageFile, imageWidth)
 
Replies continue below

Recommended for you

The SetImageHeight/Width functions take 2 input parameters: the image tag (an integer value), and the height/width (a double value). The image tag has been returned from the CreateImageFromFile function, change the following lines to use it.

Code:
ufs.Drf.SetImageHeight(imageTag, imageheight)
ufs.Drf.SetImageWidth(imageTag, imageWidth)

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor