Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to apply a style to a picture using WordPictureWriter in ETO?

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
bsee1
823 Views, 13 Replies

How to apply a style to a picture using WordPictureWriter in ETO?

I'm trying to insert a picture into a word document I'm generating from Inventor ETO 2012. By default, the picture seems to be set to word wrap as inline, which makes Word give it a low priority and hide it behind all text.  All I want to do is change the wrap style to Square.

 

Using Microsoft's site, I found what i believe to be the proper style setting.

http://msdn.microsoft.com/en-us/library/ff835490.aspx

 

Autodesk's guide for using WordPictureWriter:

http://wikihelp.autodesk.com/Inventor_ETO/enu/2012/Help/0000-Inventor0/0223-Library_223/0526-Office_...

 

Can anyone tell me why this doesn't work?  No matter what I change style to, absolutely nothing changes.  It is always set as inline.

 

--code--

Child StationPicture As :WordPictureWriter, Quantity = NumberofStations
Bookmark = "InsertPicture" + stringValue(child.index)
Placement = :Replace
 style = "wdWrapMergeSquare"
PictureFile = nth(child.index,PictureFiles)
End Child

--code--

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
13 REPLIES 13
Message 2 of 14
JDMather
in reply to: bsee1

Can you attach the file here?
I do this all the time for classroom lab instructions.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


The CADWhisperer YouTube Channel


EESignature

Message 3 of 14
bsee1
in reply to: JDMather

Not sure if you meant the template file or the output file, but here's both. I'm inserting everything into the template using bookmarks. To be clear, the pictures are being inserted into the document, but behind the layer of text.

 

See page 8 of the template for where pictures are inserted.

 

See page 11 of the output file to see where the picture is inserted. Note that if you change the word wrap to square it suddenly becomes visible.

 

 

 

Edited by request
Discussion_Admin

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 4 of 14
JDMather
in reply to: bsee1


@bsee1 wrote:

I'm inserting everything into the template using bookmarks. To be clear, the pictures are being inserted into the document, but behind the layer of text.

 

See page 8 of the template for where pictures are inserted.

 


Kind of important information left out of the original post?
Not sure how to proceed without the image files?

Maybe someone else can figure this one out.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


The CADWhisperer YouTube Channel


EESignature

Message 5 of 14
bsee1
in reply to: JDMather

I'm not sure what you mean. I can't give you the entire project, it's 600mb.  All I'm asking for is how to apply a style to the pictures.

 

I can get the pictures into the document, that isn't a problem.  The problem is the placement of the pictures.  They insert into the document in inline wordwrap style, and I need them in square wordwrap style.  It shouldn't be dependant on what pictures I use at all.  In the output file you can see exactly how the picture gets inserted(page 11).

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 6 of 14
JDMather
in reply to: bsee1


@bsee1 wrote:

I'm not sure what you mean. I can't give you the entire project, it's 600mb.  


I'm not interested in the entire project - only one word in doc file and one image file.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


The CADWhisperer YouTube Channel


EESignature

Message 7 of 14
bsee1
in reply to: JDMather

Technically they're both in the previous output file I posted, but I'll shorten everything up.  I've attached a shortened version of the output file, the template file, and the image being inserted.

 

In the output file, the grey bar is where Inventor attempted to insert the picture.  Notice that it isn't actually visible.  If you double click on that grey bar and set it to use the square word wrap, the picture becomes visible.  

 

I want to set it to set it to use square word wrap when the document is created in Inventor.  

 

 

Edited by request
Discussion_Admin

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 8 of 14
JDMather
in reply to: bsee1

I am able to set it to Square in the Doc you attached.
Are you able to double click on the image and set (after the fact)?

 

Also - I always set my Inventor background to white (Presentation) 1-color for placing images in documents.


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


The CADWhisperer YouTube Channel


EESignature

Message 9 of 14
bsee1
in reply to: JDMather

Yes I can also set it to square after the fact by double clicking on it.  I'll look into using a white background, thanks.

 

But my main question is why the style property in the Inventor code beneath doesn't work.  The style property is something Inventor uses, and "wdWrapMergeSquare" comes straight from Microsoft's image styles.  That is the only line in the code that does not work.

 

--code--

Child StationPicture As :WordPictureWriter, Quantity = NumberofStations
Bookmark = "InsertPicture" + stringValue(child.index)
Placement = :Replace
 style = "wdWrapMergeSquare"
PictureFile = nth(child.index,PictureFiles)
End Child

--code--

 

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 10 of 14
bsee1
in reply to: bsee1

So, still need help here.  I'll make my question a bit simpler.  Has anyone ever used the style property of WordPictureWriter and been able to make it work?  If so, what style did you use?

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 11 of 14

Hi,

 

Can you send me a short video of your workflow and explain me on what is happening and what's your requirement. This might help me to understand your problem better.



Vinod Balasubramanian
AutoCAD Industry Support & Escalation Lead

Message 12 of 14

Here is a link to download the screencap. It's only 30mb.
http://dl.dropbox.com/u/46698764/WordPictureWriter_Screencap.avi

 

In the video, I highlight the relevant code(shown below), then generate the document. After the document is generated, I click on a few pictures. They are hidden behind text and you can only see their outline. I then change one of the pictures to use the square text wrap style.

 

Here is the code I'm working with:

Child StationPicture As :WordPictureWriter, Quantity =    NumberofStations
Bookmark = "InsertPicture" + stringValue(child.index)
Placement = :Replace
PictureFile = nth(child.index,PictureFiles)
End Child

 

The problem is that these pictures need to be visible, and nothing I do in Inventor seems to be able to change that. When I tried to resolve the problem, I was under the impression I could use the style tag in Inventor to apply a Microsoft Word style to the picture. I tried using

style = wdWrapMergeSquare

 

It did not work. Here is the list of Microsoft Word styles I *thought* would work: http://msdn.microsoft.com/en-us/library/ff835490.aspx

 

In WordPictureWriter, is there ANY style that I can apply to an image by using style= ? Specifically, I need to be able to apply square text wrapping to a picture in a document generated from Inventor..

 

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
Message 13 of 14

After reviewing the thread and the code, it appears that style parameter is common to all word writer elements, and refers to the style name to be applied to text or a picture element: “Normal”, “Heading 1”, “Heading 2”, “Title”, etc. In the picture case, it is not the specific word wrapping style around an image.

 

Have a look at the samples project, there is an Office Sample that has a picture writer example. The samples are installed to C:\Users\Public\Documents\Autodesk\Inventor ETO 2012\Inventor\Samples.

 

After reviewing the office sample, make sure the customer sets up/formats the image correctly in the template. There aren’t a lot of options for formatting in the child rule parameters.

 


______________________________________________________________

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!

 



Vinod Balasubramanian
AutoCAD Industry Support & Escalation Lead

Message 14 of 14
bsee1
in reply to: bsee1

For anyone else that experiences this problem, I came up with a workaround solution.  If you put a 1x1 pixel image either before the bookmark you're inserting the image to, or inside of it, give that the specified wordwrap.  Text by itself cannot be given a wordwrap.

 

Also, the solution proposed above this post will not work, nor will the sample work.  In most documents, inserting images worked fine, so it wasn't a problem with how I was inserting.  Images with a word wrap that hides them by default seems to be an odd case, and I'm sure there's a better way to do what I'm suggesting, but it should work.

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums