News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Instant Isometrics

Started by JuneTheSecond, February 19, 2017, 06:33:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nikolay

Here is the version fixed for 64 bits (hopefully, pls check)

asdfgh

Thanks Nikolay,

Do you have the 64 bit version for "Instant Isometrics 7.vsd" too?  Maybe "Instant Isometrics 8.vsd" instead ?

Nikolay

#32
Fixed also (it's the same code).
Attached is "Instant Isometrics 8.vsd"

BTW I think this feature could be a nice addition to VSU, wouldn't it?  8)

Surrogate

Quote from: Nikolay on July 31, 2024, 05:17:05 PMBTW I think this feature could be a nice addition to VSU, wouldn't it?  8)
Great idea 👍 

asdfgh

#34
Quote from: Nikolay on July 31, 2024, 05:17:05 PMFixed also (it's the same code).
Attached is "Instant Isometrics 8.vsd"

BTW I think this feature could be a nice addition to VSU, wouldn't it?  8)

I totally agree.   Did you try it (I mean using the "View Direction... and GO") ?

Nikolay

#35
Yes, tested on local x86 and x64. Seems to work fine for me.
I have dropped a new shape from a stencil, and clicked "GO". The macro properly transformed the shape (group) to isometrics.

From the "technical" point of view, I'm really bad at math, JuneTheSecond is just a genius.
The best I could do is try to port the code to C# to include in the VSU.

asdfgh

:o
I always got the "Something Strange!" pop-up" when I copy shape from the left.

Nikolay

#37
For me it's all good:


You can try to debug, as following:

1. Open the VBA editor (Alt+F11)
2. Comment out the line with error handling, this one (in Module1):

' On Error GoTo ErrHnd 

3. Try again and see where the error happens exactly.

This text "Something Strange" comes up if any error happens, as far as I was able to figure out from the code.

asdfgh

The error handler is located into the CommandButton1_Click()

I'll do some tests and keep you in touch.

Thanks!

asdfgh

The problem is located into Module1, rotate (see line below)
shp.CellsSRC(visSectionFirstComponent + iGeom - 1, iRow, 0).FormulaU = "WIDTH*" & (X(1) * Cos(ang) - Y(1) * Sin(ang) + LocPinX) / Width610

Nikolay

#40
What is the error you get?

I mean, this line by itself is fine; it works for me.
Could be (theoretically): Your language settings (what are they, i.e. what language do you use?) Your Visio version (what is it?). The shape you are dropping (which one do you drop?).. or something else...
Still hard to tell what the problem is

Thomas Winkel

The problem is the "," instead of "." when converting double to string.
After some Replace() it works:

"WIDTH*" & Replace((X(1) * Cos(ang) - Y(1) * Sin(ang) + LocPinX) / Width, ",", ".")

asdfgh

Working fine now... I'll remember that one.

Thanks for your help (and others too).

Nikolay

#43
This "." vs "," and ";" vs "," is really annoying. Half of the world is using "." and another half ","

It is sad you need to watch out for that stuff all the time...
Most code is jut not tested with different locale.

Something to take a notice of when porting to C# for VSU  :)

Anyway - an easy fix is just change that "." to "," in your local language settings.
Or set the system to a different language (German or Japanese - take a pick?)  ;D

asdfgh

Another one to keep in mind.

Thanks Nikolay.

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 394 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1252KB.
Tokens: post-login.
Cache hits: 13: 0.00159s for 26,740 bytes (show)
Cache misses: 3: (show)
Queries used: 20.

[Show Queries]